Use of virtual candidate prediction and weighted prediction in video processing

ABSTRACT

A video processing method includes constructing, for a conversion between a current block of a video and a bitstream representation of the video, a motion candidate list with at least one motion candidate; and determining, based on a candidate type of a first motion candidate, whether a generalized bi-prediction (GBI) processing tool is enabled. The GBI processing tool comprises deriving a final prediction based on applying equal or unequal weights to predictions from different reference lists according to a set of weights. The method also includes performing the conversion according to the determining.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Patent ApplicationNo. PCT/CN2020/072595, filed on Jan. 17, 2020, which claims the priorityto and benefits of International Patent Application No.PCT/CN2019/072154, filed on Jan. 17, 2019. All the aforementioned patentapplications are hereby incorporated by reference in their entireties.

TECHNICAL FIELD

The present patent document relates to the field of video coding anddecoding.

BACKGROUND

Currently, efforts are underway to improve the performance of currentvideo codec technologies to provide better compression ratios or providevideo coding and decoding schemes that allow for lower complexity orparallelized implementations. Industry experts have recently proposedseveral new video coding tools and tests are currently underway fordetermining their effectivity.

SUMMARY

The present document provides techniques for incorporating localillumination compensation in embodiments of video encoders or decoders.

In one example aspect, a method of video processing is disclosed. Themethod includes constructing, for a conversion between a current blockof a video and a bitstream representation of the video, a motioncandidate list with at least one motion candidate; and determining,based on a candidate type of a first motion candidate, whether ageneralized bi-prediction (GBI) processing tool is enabled. The GBIprocessing tool comprises deriving a final prediction based on applyingequal or unequal weights to predictions derived from different referencelists according to a set of weights. The method also includes performingthe conversion according to the determining.

In another example aspect, a method of video processing is disclosed.The method includes determining, for a conversion between a currentblock of a video and a bitstream representation of the video, anoperational state of local illumination compensation (LIC) prediction,generalized bi (GBI) prediction, or weighted prediction. The currentblock is associated with a prediction technique that use at least onevirtual motion candidate. The method also includes performing theconversion according to the determining.

In another example aspect, a method of video processing is disclosed.The method includes determining, for a conversion between a currentblock of a video and a bitstream representation of the video, a state ofa filtering operation or one or more parameters of the filteringoperation for the current block based on a characteristic of localillumination compensation (LIC) prediction, generalized bi (GBI)prediction, weighted prediction, or affine motion prediction. The methodalso includes performing the conversion based on the determining.

In another example aspect, a method of video processing is disclosed.The method includes determining, in a conversion between a video blockand a bitstream representation of the video block, that a video block isa boundary block of a coding tree unit (CTU) in which the video block ispositioned and therefore local illumination compensation (LIC) codingtool is enabled for the video block, deriving, based on the determiningthat LIC coding tool is enabled for the video block, parameters forlocal illumination compensation (LIC) of the video block, and performingthe conversion by adjusting pixel values of the video block using LIC.

In another example aspect, a method of video processing is disclosed.The method includes determining, in a conversion between a video blockand a bitstream representation of the video block, that a video block isan inner block of a coding tree unit (CTU) in which the video block ispositioned and therefore local illumination compensation (LIC) codingtool is disabled for the video block, inheriting parameters for LIC ofthe video block, and performing the conversion by adjusting pixel valuesof the video block using LIC.

In yet another example aspect, another method of video processing isdisclosed. The method includes determining, in a conversion between avideo block and a bitstream representation of the video block, that bothlocal illumination compensation and intra block copy coding tools areenabled for use by the current block, and performing the conversion byperforming local illumination compensation (LIC) and intra block copyoperations on the video block.

In yet another example aspect, another method of video processing isdisclosed. The method includes performing the conversion by performinglocal illumination compensation (LIC) and intra block copy operations onthe video block, and performing the conversion between the current blockand a corresponding bitstream representation of the current block.

In yet another example aspect, another method of video processing isdisclosed. The method includes determining, during a conversion betweena video block of a video and a bitstream representation of the video,local illumination compensation (LIC) parameters for the video blockusing at least some samples of neighboring blocks of the video block,and performing the conversion between the video block and the bitstreamrepresentation by performing LIC using the determined parameters.

In yet another example aspect, another method of video processing isdisclosed. The method includes performing a conversion between a videoand a bitstream representation of the video, wherein the video isrepresented as video frames comprising video blocks, and localillumination compensation (LIC) is enabled only for video blocks thatuse a geometric prediction structure including a triangular predictionmode.

In yet another example aspect, another method of video processing isdisclosed. The method includes performing a conversion between a videoand a bitstream representation of the video, wherein the video isrepresented as video frames comprising video blocks, and localillumination compensation (LIC) is implemented for less than all pixelsof a current block in the conversion to its corresponding bitstreamrepresentation.

In yet another example aspect, another method of video processing isdisclosed. The method includes determining, in a conversion between avideo block and a bitstream representation of the video block, that bothlocal illumination compensation (LIC) and either generalizedbi-prediction (GBi) or multi-hypothesis inter prediction coding toolsare enabled for use by the current block, and performing the conversionby performing LIC and either GBi or multi-hypothesis inter predictionoperations on the video block.

In yet another example aspect, another method of video processing isdisclosed. The method includes determining, in a conversion between avideo block and a bitstream representation of the video block, that bothlocal illumination compensation (LIC) and combined inter-intraprediction (CIIP) coding tools are enabled for use by the current block,and performing the conversion by performing LIC and CIIP operations onthe video block.

In yet another example aspect, another method of video processing isdisclosed. The method includes determining a video block is associatedwith a prediction technique including pairwise prediction or combined-biprediction; determining an operational state of local illuminationcompensation (LIC), generalized bi-prediction (GBI), or weightedprediction, the operational state being enabled or disabled based on thedetermination that the video block is associated with the predictiontechnique; and performing further processing of the video block inaccordance with the operational state of LIC, GBI, or weightedprediction.

In yet another example aspect, another method of video processing isdisclosed. The method includes determining a characteristic regardinglocal illumination compensation (LIC), generalized bi-prediction (GBI),or weighted prediction; and applying a deblocking filter to a videoblock based on the determination of the characteristic.

In yet another example aspect, another method of video processing isdisclosed. The method includes determining a characteristic regardingaffine mode, affine parameters, or affine type in relation to a videoblock; and applying a deblocking filter to the video block based on thedetermination of the characteristic.

In yet another example aspect, another method of video processing isdisclosed. The method includes storing data associated with a combinedinter-intra prediction (CIIP) flag in a history-based motion vectorprediction (HMVP) table; storing motion information in the HMVP table;and performing further processing of a video block using the data storedin the HVMP table and the motion information stored in the HMVP table.

In yet another example aspect, another method of video processing isdisclosed. The method includes storing data associated with a localillumination compensation (LIC) flag in a history-based motion vectorprediction (HMVP) table; storing motion information in the HMVP table;and performing further processing of a video block using the data storedin the HVMP table and the motion information stored in the HMVP table.

In yet another example aspect, another method of video processing isdisclosed. The method includes determining that local illuminationcompensation (LIC) is to be performed; dividing a video block into videoprocessing data units (VPDUs) based on the determination that LIC is tobe performed; and performing LIC in sequence or in parallel for theVPDUs.

In yet another representative aspect, the various techniques describedherein may be embodied as a computer program product stored on anon-transitory computer readable media. The computer program productincludes program code for carrying out the methods described herein.

In yet another representative aspect, a video decoder apparatus mayimplement a method as described herein.

The details of one or more implementations are set forth in theaccompanying attachments, the drawings, and the description below. Otherfeatures will be apparent from the description and drawings, and fromthe claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example of a derivation process for merge candidateslist construction.

FIG. 2 shows example positions of spatial merge candidates.

FIG. 3 shows examples of candidate pairs considered for redundancy checkof spatial merge candidates.

FIG. 4 shows example Positions for the second PU of N×2N and 2N×Npartitions.

FIG. 5 is an Illustration of motion vector scaling for temporal mergecandidate.

FIG. 6 shows examples of candidate positions for temporal mergecandidate, C0 and C1.

FIG. 7 shows an example of combined bi-predictive merge candidate

FIG. 8 shows an example of a derivation process for motion vectorprediction candidates.

FIG. 9 is an example illustration of motion vector scaling for spatialmotion vector candidate.

FIG. 10 illustrates an example of advanced temporal motion vectorpredictor (ATMVP) for a Coding Unit (CU).

FIG. 11 shows an Example of one CU with four sub-blocks (A-D) and itsneighboring blocks (a-d).

FIG. 12 shows an example of a planar motion vector prediction process.

FIG. 13 is a flowchart of an example of encoding with different motionvector (MV) precision.

FIG. 14 is an example Illustration of sub-blocks where OBMC applies.

FIG. 15 shows an example of neighboring samples used for deriving ICparameters.

FIG. 16 is an illustration of splitting a coding unit (CU) into twotriangular prediction units.

FIG. 17 shows an example of positions of neighboring blocks.

FIG. 18 shows an example in which a CU applies the 1^(st) weightingfactor group.

FIG. 19 shows an example of motion vector storage implementation.

FIG. 20 shows an example of a simplified affine motion model.

FIG. 21 shows an example of affine MVF per sub-block.

FIG. 22 shows examples of (a) 4-paramenter affine model (b) and6-parameter affine model.

FIG. 23 shows an example of a Motion Vector Predictor (MV) for AF_INTERmode.

FIG. 24A-24B shows examples of candidates for AF_MERGE mode.

FIG. 25 shows candidate positions for affine merge mode.

FIG. 26 shows example process for bilateral matching.

FIG. 27 shows example process of template matching.

FIG. 28 illustrates an implementation of unilateral motion estimation(ME) in frame rate upconversion (FRUC).

FIG. 29 illustrates an embodiment of an Ultimate Motion VectorExpression (UMVE) search process.

FIG. 30 shows examples of UMVE search points.

FIG. 31 shows an example of distance index and distance offset mapping.

FIG. 32 shows an example of an optical flow trajectory.

FIG. 33A-33B show examples of Bi-directional Optical flow (BIO) w/oblock extension: a) access positions outside of the block; b) paddingused in order to avoid extra memory access and calculation.

FIG. 34 illustrates an example of using Decoder-side motion vectorrefinement (DMVR) based on bilateral template matching.

FIG. 35 shows an example of neighboring samples used in a bilateralfilter.

FIG. 36 shows an example of windows covering two samples used in weightcalculation.

FIG. 37 shows an example of a decoding flow with the proposed historybased motion vector prediction (HMVP) method.

FIG. 38 shows an example of updating the table in the proposed HMVPmethod.

FIG. 39 is a block diagram of a hardware platform for implementing thevideo coding or decoding techniques described in the present document.

FIG. 40 shows an example of a hardware platform for implementing methodsand techniques described in the present document.

FIG. 41 is a flowchart of an example method of video processing.

FIG. 42 is a flowchart of an example method of video processing inaccordance with the disclosure.

FIG. 43 is a flowchart of another example method of video processing inaccordance with the disclosure.

FIG. 44 is a flowchart of yet another example method of video processingin accordance with the disclosure.

DETAILED DESCRIPTION

The present document provides several techniques that can be embodiedinto digital video encoders and decoders. Section headings are used inthe present document for clarity of understanding and do not limit scopeof the techniques and embodiments disclosed in each section only to thatsection.

1. Summary

This patent document is related to video coding technologies.Specifically, it is related to local illumination compensation (LIC) invideo coding. It may be applied to the existing video coding standardlike HEVC, or the standard (Versatile Video Coding) to be finalized. Itmay be also applicable to future video coding standards or video codec.

2. Examples of Video Coding/Decoding Technologies

Video coding standards have evolved primarily through the development ofthe well-known ITU-T and ISO/IEC standards. The ITU-T produced H.261 andH.263, ISO/IEC produced MPEG-1 and MPEG-4 Visual, and the twoorganizations jointly produced the H.262/MPEG-2 Video and H.264/MPEG-4Advanced Video Coding (AVC) and H.265/HEVC standards. Since H.262, thevideo coding standards are based on the hybrid video coding structurewherein temporal prediction plus transform coding are utilized. Toexplore the future video coding technologies beyond HEVC, Joint VideoExploration Team (JVET) was founded by VCEG and MPEG jointly in 2015.Since then, many new methods have been adopted by JVET and put into thereference software named Joint Exploration Model (JEM). In April 2018,the Joint Video Expert Team (JVET) between VCEG (Q6/16) and ISO/IEC JTC1SC29/WG11 (MPEG) was created to work on the VVC standard targeting at50% bitrate reduction compared to HEVC.

2.1. Inter Prediction in HEVC/H.265

Each inter-predicted PU has motion parameters for one or two referencepicture lists. Motion parameters include a motion vector and a referencepicture index. Usage of one of the two reference picture lists may alsobe signalled using inter_pred_idc. Motion vectors may be explicitlycoded as deltas relative to predictors.

When a CU is coded with skip mode, one PU is associated with the CU, andthere are no significant residual coefficients, no coded motion vectordelta or reference picture index. A merge mode is specified whereby themotion parameters for the current PU are obtained from neighboring PUs,including spatial and temporal candidates. The merge mode can be appliedto any inter-predicted PU, not only for skip mode. The alternative tomerge mode is the explicit transmission of motion parameters, wheremotion vector (to be more precise, motion vector difference compared toa motion vector predictor), corresponding reference picture index foreach reference picture list and reference picture list usage aresignalled explicitly per each PU. Such a mode is named Advanced motionvector prediction (AMVP) in this disclosure.

When signalling indicates that one of the two reference picture lists isto be used, the PU is produced from one block of samples. This isreferred to as ‘uni-prediction’. Uni-prediction is available both forP-slices and B-slices.

When signalling indicates that both of the reference picture lists areto be used, the PU is produced from two blocks of samples. This isreferred to as ‘bi-prediction’. Bi-prediction is available for B-slicesonly.

The following text provides the details on the inter prediction modesspecified in HEVC. The description will start with the merge mode.

2.1.1. Merge Mode

2.1.1.1. Derivation of Candidates for Merge Mode

When a PU is predicted using merge mode, an index pointing to an entryin the merge candidates list is parsed from the bitstream and used toretrieve the motion information. The construction of this list isspecified in the HEVC standard and can be summarized according to thefollowing sequence of steps:

-   -   Step 1: Initial candidates derivation        -   Step 1.1: Spatial candidates derivation        -   Step 1.2: Redundancy check for spatial candidates        -   Step 1.3: Temporal candidates derivation    -   Step 2: Additional candidates insertion        -   Step 2.1: Creation of bi-predictive candidates        -   Step 2.2: Insertion of zero motion candidates

These steps are also schematically depicted in FIG. 1. For spatial mergecandidate derivation, a maximum of four merge candidates are selectedamong candidates that are located in five different positions. Fortemporal merge candidate derivation, a maximum of one merge candidate isselected among two candidates. Since constant number of candidates foreach PU is assumed at decoder, additional candidates are generated whenthe number of candidates obtained from step 1 does not reach the maximumnumber of merge candidate (MaxNumMergeCand) which is signalled in sliceheader. Since the number of candidates is constant, index of best mergecandidate is encoded using truncated unary binarization (TU). If thesize of CU is equal to 8, all the PUs of the current CU share a singlemerge candidate list, which is identical to the merge candidate list ofthe 2N×2N prediction unit.

In the following, the operations associated with the aforementionedsteps are detailed.

2.1.1.2. Spatial Candidates Derivation

In the derivation of spatial merge candidates, a maximum of four mergecandidates are selected among candidates located in the positionsdepicted in FIG. 2. The order of derivation is A₁, B₁, B₀, A₀ and B2.Position B₂ is considered only when any PU of position A₁, B₁, B₀, A₀ isnot available (e.g. because it belongs to another slice or tile) or isintra coded. After candidate at position A₁ is added, the addition ofthe remaining candidates is subject to a redundancy check which ensuresthat candidates with same motion information are excluded from the listso that coding efficiency is improved. FIG. 3 shows examples ofcandidate pairs considered for redundancy check of spatial mergecandidates. To reduce computational complexity, not all possiblecandidate pairs are considered in the mentioned redundancy check.Instead only the pairs linked with an arrow in FIG. 3 are considered anda candidate is only added to the list if the corresponding candidateused for redundancy check has not the same motion information. Anothersource of duplicate motion information is the “second PU” associatedwith partitions different from 2N×2N. As an example, FIG. 4 depicts thesecond PU for the case of N×2N and 2N×N, respectively. When the currentPU is partitioned as N×2N, candidate at position Al is not consideredfor list construction. In fact, by adding this candidate will lead totwo prediction units having the same motion information, which isredundant to just have one PU in a coding unit. Similarly, position Biis not considered when the current PU is partitioned as 2N×N.

2.1.1.3. Temporal Candidates Derivation

In this step, only one candidate is added to the list. Particularly, inthe derivation of this temporal merge candidate, a scaled motion vectoris derived based on co-located PU belonging to the picture which has thesmallest POC difference with current picture within the given referencepicture list. The reference picture list to be used for derivation ofthe co-located PU is explicitly signalled in the slice header. FIG. 5 isan Illustration of motion vector scaling for temporal merge candidate.The scaled motion vector for temporal merge candidate is obtained asillustrated by the dotted line in FIG. 5, which is scaled from themotion vector of the co-located PU using the POC distances, tb and td,where tb is defined to be the POC difference between the referencepicture of the current picture and the current picture and td is definedto be the POC difference between the reference picture of the co-locatedpicture and the co-located picture. The reference picture index oftemporal merge candidate is set equal to zero. A practical realizationof the scaling process is described in the HEVC specification. For aB-slice, two motion vectors, one is for reference picture list 0 and theother is for reference picture list 1, are obtained and combined to makethe bi-predictive merge candidate.

In the co-located PU (Y) belonging to the reference frame, the positionfor the temporal candidate is selected between candidates C₀ and CC₁, asdepicted in FIG. 6. If PU at position C₀ is not available, is intracoded, or is outside of the current CTU row, position C₁ is used.Otherwise, position C₀ is used in the derivation of the temporal mergecandidate.

2.1.1.4. Additional Candidates Insertion

Besides spatial and temporal merge candidates, there are two additionaltypes of merge candidates: combined bi-predictive merge candidate andzero merge candidate. Combined bi-predictive merge candidates aregenerated by utilizing spatial and temporal merge candidates. Combinedbi-predictive merge candidate is used for B-Slice only. The combinedbi-predictive candidates are generated by combining the first referencepicture list motion parameters of an initial candidate with the secondreference picture list motion parameters of another. If these two tuplesprovide different motion hypotheses, they will form a new bi-predictivecandidate. As an example, FIG. 7 depicts the case when two candidates inthe original list (on the left), which have mvL0 and refIdxL0 or mvL1and refIdxL1, are used to create a combined bi-predictive mergecandidate added to the final list (on the right). There are numerousrules regarding the combinations which are considered to generate theseadditional merge candidates.

Zero motion candidates are inserted to fill the remaining entries in themerge candidates list and therefore hit the MaxNumMergeCand capacity.These candidates have zero spatial displacement and a reference pictureindex which starts from zero and increases every time a new zero motioncandidate is added to the list. The number of reference frames used bythese candidates is one and two for uni and bi-directional prediction,respectively. Finally, no redundancy check is performed on thesecandidates.

2.1.1.5. Motion Estimation Regions for Parallel Processing

To speed up the encoding process, motion estimation can be performed inparallel whereby the motion vectors for all prediction units inside agiven region are derived simultaneously. The derivation of mergecandidates from spatial neighbourhood may interfere with parallelprocessing as one prediction unit cannot derive the motion parametersfrom an adjacent PU until its associated motion estimation is completed.To mitigate the trade-off between coding efficiency and processinglatency, HEVC defines the motion estimation region (MER) whose size issignalled in the picture parameter set using the“log2_parallel_merge_level_minus2” syntax element. When a MER isdefined, merge candidates falling in the same region are marked asunavailable and therefore not considered in the list construction.

2.1.2. AMVP

AMVP exploits spatio-temporal correlation of motion vector withneighboring PUs, which is used for explicit transmission of motionparameters. For each reference picture list, a motion vector candidatelist is constructed by firstly checking availability of left, abovetemporally neighboring PU positions, removing redundant candidates andadding zero vector to make the candidate list to be constant length.Then, the encoder can select the best predictor from the candidate listand transmit the corresponding index indicating the chosen candidate.Similarly with merge index signalling, the index of the best motionvector candidate is encoded using truncated unary. The maximum value tobe encoded in this case is 2 (see FIG. 8). In the following sections,details about derivation process of motion vector prediction candidateare provided.

2.1.2.1. Derivation of AMVP Candidates

In motion vector prediction, two types of motion vector candidates areconsidered: spatial motion vector candidate and temporal motion vectorcandidate. For spatial motion vector candidate derivation, two motionvector candidates are eventually derived based on motion vectors of eachPU located in five different positions as depicted in FIG. 8.

For temporal motion vector candidate derivation, one motion vectorcandidate is selected from two candidates, which are derived based ontwo different co-located positions. After the first list ofspatio-temporal candidates is made, duplicated motion vector candidatesin the list are removed. If the number of potential candidates is largerthan two, motion vector candidates whose reference picture index withinthe associated reference picture list is larger than 1 are removed fromthe list. If the number of spatio-temporal motion vector candidates issmaller than two, additional zero motion vector candidates is added tothe list.

2.1.2.2. Spatial Motion Vector Candidates

In the derivation of spatial motion vector candidates, a maximum of twocandidates are considered among five potential candidates, which arederived from PUs located in positions as depicted in FIG. 2, thosepositions being the same as those of motion merge. The order ofderivation for the left side of the current PU is defined as A₀, A₁, andscaled A₀, scaled A₁. The order of derivation for the above side of thecurrent PU is defined as B₀, B₁, B₂, scaled B₀, scaled B₁, scaled B₂.For each side there are therefore four cases that can be used as motionvector candidate, with two cases not required to use spatial scaling,and two cases where spatial scaling is used. The four different casesare summarized as follows.

-   -   No spatial scaling        -   (1) Same reference picture list, and same reference picture            index (same POC)        -   (2) Different reference picture list, but same reference            picture (same POC)    -   Spatial scaling        -   (3) Same reference picture list, but different reference            picture (different POC)        -   (4) Different reference picture list, and different            reference picture (different POC)

The no-spatial-scaling cases are checked first followed by the spatialscaling. Spatial scaling is considered when the POC is different betweenthe reference picture of the neighboring PU and that of the current PUregardless of reference picture list. If all PUs of left candidates arenot available or are intra coded, scaling for the above motion vector isallowed to help parallel derivation of left and above MV candidates.Otherwise, spatial scaling is not allowed for the above motion vector.

In a spatial scaling process, the motion vector of the neighboring PU isscaled in a similar manner as for temporal scaling, as depicted as FIG.9. The main difference is that the reference picture list and index ofcurrent PU is given as input; the actual scaling process is the same asthat of temporal scaling.

2.1.2.3. Temporal Motion Vector Candidates

Apart for the reference picture index derivation, all processes for thederivation of temporal merge candidates are the same as for thederivation of spatial motion vector candidates (see FIG. 6). Thereference picture index is signalled to the decoder.

2.2. New Inter Prediction Methods in JEM

2.2.1. Sub-CU Based Motion Vector Prediction

In the JEM with QTBT, each CU can have at most one set of motionparameters for each prediction direction. Two sub-CU level motion vectorprediction methods are considered in the encoder by splitting a large CUinto sub-CUs and deriving motion information for all the sub-CUs of thelarge CU. Alternative temporal motion vector prediction (ATMVP) methodallows each CU to fetch multiple sets of motion information frommultiple blocks smaller than the current CU in the collocated referencepicture. In spatial-temporal motion vector prediction (STMVP) methodmotion vectors of the sub-CUs are derived recursively by using thetemporal motion vector predictor and spatial neighboring motion vector.

To preserve more accurate motion field for sub-CU motion prediction, themotion compression for the reference frames is currently disabled.

2.2.1.1. Alternative Temporal Motion Vector Prediction

In the alternative temporal motion vector prediction (ATMVP) method, themotion vectors temporal motion vector prediction (TMVP) is modified byfetching multiple sets of motion information (including motion vectorsand reference indices) from blocks smaller than the current CU. As shownin FIG. 10, the sub-CUs are square N×N blocks (N is set to 4 bydefault).

ATMVP predicts the motion vectors of the sub-CUs within a CU in twosteps. The first step is to identify the corresponding block in areference picture with a so-called temporal vector. The referencepicture is called the motion source picture. The second step is to splitthe current CU into sub-CUs and obtain the motion vectors as well as thereference indices of each sub-CU from the block corresponding to eachsub-CU, as shown in FIG. 10.

In the first step, a reference picture and the corresponding block isdetermined by the motion information of the spatial neighboring blocksof the current CU. To avoid the repetitive scanning process ofneighboring blocks, the first merge candidate in the merge candidatelist of the current CU is used. The first available motion vector aswell as its associated reference index are set to be the temporal vectorand the index to the motion source picture. This way, in ATMVP, thecorresponding block may be more accurately identified, compared withTMVP, wherein the corresponding block (sometimes called collocatedblock) is always in a bottom-right or center position relative to thecurrent CU.

In the second step, a corresponding block of the sub-CU is identified bythe temporal vector in the motion source picture, by adding to thecoordinate of the current CU the temporal vector. For each sub-CU, themotion information of its corresponding block (the smallest motion gridthat covers the center sample) is used to derive the motion informationfor the sub-CU. After the motion information of a corresponding N×Nblock is identified, it is converted to the motion vectors and referenceindices of the current sub-CU, in the same way as TMVP of HEVC, whereinmotion scaling and other procedures apply. For example, the decoderchecks whether the low-delay condition (i.e. the POCs of all referencepictures of the current picture are smaller than the POC of the currentpicture) is fulfilled and possibly uses motion vector MV_(x) (the motionvector corresponding to reference picture list X) to predict motionvector MV_(y) (with X being equal to 0 or 1 and Y being equal to 1−X)for each sub-CU.

2.2.1.2. Spatial-Temporal Motion Vector Prediction

In this method, the motion vectors of the sub-CUs are derivedrecursively, following raster scan order. FIG. 11 illustrates thisconcept. Let us consider an 8×8 CU which contains four 4×4 sub-CUs A, B,C, and D. The neighboring 4×4 blocks in the current frame are labelledas a, b, c, and d.

The motion derivation for sub-CU A starts by identifying its two spatialneighbours. The first neighbour is the N×N block above sub-CU A (blockc). If this block c is not available or is intra coded the other N×Nblocks above sub-CU A are checked (from left to right, starting at blockc). The second neighbour is a block to the left of the sub-CU A (blockb). If block b is not available or is intra coded other blocks to theleft of sub-CU A are checked (from top to bottom, staring at block b).The motion information obtained from the neighboring blocks for eachlist is scaled to the first reference frame for a given list. Next,temporal motion vector predictor (TMVP) of sub-block A is derived byfollowing the same procedure of TMVP derivation as specified in HEVC.The motion information of the collocated block at location D is fetchedand scaled accordingly. Finally, after retrieving and scaling the motioninformation, all available motion vectors (up to 3) are averagedseparately for each reference list. The averaged motion vector isassigned as the motion vector of the current sub-CU.

2.2.1.3. Sub-CU Motion Prediction Mode Signalling

The sub-CU modes are enabled as additional merge candidates and there isno additional syntax element required to signal the modes. Twoadditional merge candidates are added to merge candidates list of eachCU to represent the ATMVP mode and STMVP mode. Up to seven mergecandidates are used, if the sequence parameter set indicates that ATMVPand STMVP are enabled. The encoding logic of the additional mergecandidates is the same as for the merge candidates in the HM, whichmeans, for each CU in P or B slice, two more RD checks is needed for thetwo additional merge candidates.

In the JEM, all bins of merge index is context coded by CABAC. While inHEVC, only the first bin is context coded and the remaining bins arecontext by-pass coded.

2.2.2. Pairwise Average Candidates

Pairwise average candidates are generated by averaging predefined pairsof candidates in the current merge candidate list, and the predefinedpairs are defined as {(0, 1), (0, 2), (1, 2), (0, 3), (1, 3), (2, 3)},where the numbers denote the merge indices to the merge candidate list.The averaged motion vectors are calculated separately for each referencelist. If both motion vectors are available in one list, these two motionvectors are averaged even when they point to different referencepictures; if only one motion vector is available, use the one directly;if no motion vector is available, keep this list invalid. The pairwiseaverage candidates replace the combined candidates in HEVC standard.

The complexity analysis of pairwise average candidates is summarized inthe Table 1. For the worst case of additional calculations for averaging(the last column in Table 1), 4 additions and 4 shifts are needed foreach pair (MVx and MVy in L0 and L1), and 4 reference index comparisonsare needed for each pair (refIdx0 is valid and refIdx1 is valid in L0and L1). There are 6 pairs, leading to 24 additions, 24 shifts, and 24reference index comparisons in total. The combined candidates in HEVCstandard use 2 reference index comparisons for each pair (refIdx0 isvalid in L0 and refIdx1 is valid in L1), and there are 12 pairs, leadingto 24 reference index comparisons in total.

TABLE 1 Operation analysis for the pairwise average candidates Max MaxMax number Max Max number number of number of number of Additional ofMerge potential candidate of MV temporal local memory list sizecandidates comparisons scalings candidates buffer access Others 6, 8, 106 0 0 0 0 0 Replace HEVC combined candidates, need additionalcalculations for averaging

2.2.3. Planar Motion Vector Prediction

In JVET-K0135, planar motion vector prediction is proposed.

To generate a smooth fine granularity motion field, FIG. 12 gives abrief description of the planar motion vector prediction process.

Planar motion vector prediction is achieved by averaging a horizontaland vertical linear interpolation on 4×4 block basis as follows.

P(x, y)=(H×P _(h)(x, y)+W×P _(v)(x, y)+H×W)/(2×H×W)   Eq. (1)

W and H denote the width and the height of the block. (x, y) is thecoordinates of current sub-block relative to the above left cornersub-block. All the distances are denoted by the pixel distances dividedby 4. P(x, y) is the motion vector of current sub-block.

The horizontal prediction P_(h)(x, y) and the vertical predictionP_(v)(x, y) for location (x, y) are calculated as follows:

P _(h)(x, y)=(W−1−x)×L(−1, y)+(x+1)×R(W, y)   Eq. (2)

P _(v)(x, y)=(H−1−y)×A(x, −1)+(y+1)×B(x, H)   Eq. (3)

where L(−1, y) and R(W, y) are the motion vectors of the 4×4 blocks tothe left and right of the current block. A(x, −1) and B(x, H) are themotion vectors of the 4×4 blocks to the above and bottom of the currentblock.

The reference motion information of the left column and above rowneighbour blocks are derived from the spatial neighbour blocks ofcurrent block.

The reference motion information of the right column and bottom rowneighbour blocks are derived as follows.

(1) Derive the motion information of the bottom right temporal neighbour4×4 block

(2) Compute the motion vectors of the right column neighbour 4×4 blocks,using the derived motion information of the bottom right neighbour 4×4block along with the motion information of the above right neighbour 4×4block, as described in Eq. (4) below.

(3) Compute the motion vectors of the bottom row neighbour 4×4 blocks,using the derived motion information of the bottom right neighbour 4×4block along with the motion information of the bottom left neighbour 4×4block, as described in Eq. (5).

R(W, y)=((H−y−1)×AR+(y+1)×BR)/H   Eq. (4)

B(x, H)=((W−x−1)×BL+(x+1)×BR)/W   Eq. (5)

where AR is the motion vector of the above right spatial neighbour 4×4block, BR is the motion vector of the bottom right temporal neighbour4×4 block, and BL is the motion vector of the bottom left spatialneighbour 4×4 block.

The motion information obtained from the neighboring blocks for eachlist is scaled to the first reference picture for a given list.

2.2.4. Adaptive Motion Vector Different Resolution

In HEVC, motion vector differences (MVDs) (between the motion vector andpredicted motion vector of a PU) are signalled in units of quarter lumasamples when use_integer_mv_flag is equal to 0 in the slice header. Inthe JEM, a locally adaptive motion vector resolution (LAMVR) isintroduced. In the JEM, MVD can be coded in units of quarter lumasamples, integer luma samples or four luma samples. The MVD resolutionis controlled at the coding unit (CU) level, and MVD resolution flagsare conditionally signalled for each CU that has at least one non-zeroMVD components.

For a CU that has at least one non-zero MVD components, a first flag issignalled to indicate whether quarter luma sample MV precision is usedin the CU. When the first flag (equal to 1) indicates that quarter lumasample MV precision is not used, another flag is signalled to indicatewhether integer luma sample MV precision or four luma sample MVprecision is used.

When the first MVD resolution flag of a CU is zero, or not coded for aCU (meaning all MVDs in the CU are zero), the quarter luma sample MVresolution is used for the CU. When a CU uses integer-luma sample MVprecision or four-luma-sample MV precision, the MVPs in the AMVPcandidate list for the CU are rounded to the corresponding precision.

In the encoder, CU-level RD checks are used to determine which MVDresolution is to be used for a CU. That is, the CU-level RD check isperformed three times for each MVD resolution. To accelerate encoderspeed, the following encoding schemes are applied in the JEM.

-   -   During RD check of a CU with normal quarter luma sample MVD        resolution, the motion information of the current CU (integer        luma sample accuracy) is stored. The stored motion information        (after rounding) is used as the starting point for further small        range motion vector refinement during the RD check for the same        CU with integer luma sample and 4 luma sample MVD resolution so        that the time-consuming motion estimation process is not        duplicated three times.    -   RD check of a CU with 4 luma sample MVD resolution is        conditionally invoked. For a CU, when RD cost integer luma        sample MVD resolution is much larger than that of quarter luma        sample MVD resolution, the RD check of 4 luma sample MVD        resolution for the CU is skipped.

The encoding process is shown in FIG. 13. First, 1/4 pel MV is testedand the RD cost is calculated and denoted as RDCost0, then integer MV istested and the RD cost is denoted as RDCost1. If RDCost1<th*RDCost0(wherein th is a positive value), then 4-pel MV is tested; otherwise,4-pel MV is skipped. Basically, motion information and RD cost etc. arealready known for 1/4 pel MV when checking integer or 4-pel MV, whichcan be reused to speed up the encoding process of integer or 4-pel MV.

2.2.5. Higher Motion Vector Storage Accuracy

In HEVC, motion vector accuracy is one-quarter pel (one-quarter lumasample and one-eighth chroma sample for 4:2:0 video). In the JEM, theaccuracy for the internal motion vector storage and the merge candidateincreases to 1/16 pel. The higher motion vector accuracy (1/16 pel) isused in motion compensation inter prediction for the CU coded withskip/merge mode. For the CU coded with normal AMVP mode, either theinteger-pel or quarter-pel motion is used, as described in section2.2.2.

SHVC upsampling interpolation filters, which have same filter length andnormalization factor as HEVC motion compensation interpolation filters,are used as motion compensation interpolation filters for the additionalfractional pel positions. The chroma component motion vector accuracy is1/32 sample in the JEM, the additional interpolation filters of 1/32 pelfractional positions are derived by using the average of the filters ofthe two neighboring 1/16 pel fractional positions.

2.2.6. Overlapped Block Motion Compensation

Overlapped Block Motion Compensation (OBMC) has previously been used inH.263. In the JEM, unlike in H.263, OBMC can be switched on and offusing syntax at the CU level. When OBMC is used in the JEM, the OBMC isperformed for all motion compensation (MC) block boundaries except theright and bottom boundaries of a CU. Moreover, it is applied for boththe luma and chroma components. In the JEM, a MC block is correspondingto a coding block. When a CU is coded with sub-CU mode (includes sub-CUmerge, affine and FRUC mode), each sub-block of the CU is a MC block. Toprocess CU boundaries in a uniform fashion, OBMC is performed atsub-block level for all MC block boundaries, where sub-block size is setequal to 4×4, as illustrated in FIG. 14.

When OBMC applies to the current sub-block, besides current motionvectors, motion vectors of four connected neighboring sub-blocks, ifavailable and are not identical to the current motion vector, are alsoused to derive prediction block for the current sub-block. Thesemultiple prediction blocks based on multiple motion vectors are combinedto generate the final prediction signal of the current sub-block.

Prediction block based on motion vectors of a neighboring sub-block isdenoted as P_(N), with N indicating an index for the neighboring above,below, left and right sub-blocks and prediction block based on motionvectors of the current sub-block is denoted as P_(C). When PN is basedon the motion information of a neighboring sub-block that contains thesame motion information to the current sub-block, the OBMC is notperformed from P_(N). Otherwise, every sample of P_(N) is added to thesame sample in P_(C), i.e., four rows/columns of P_(N) are added toP_(C). The weighting factors {1/4, 1/8, 1/16, 1/32} are used for PN andthe weighting factors {3/4, 7/8, 15/16, 31/32} are used for P_(C). Theexception are small MC blocks, (i.e., when height or width of the codingblock is equal to 4 or a CU is coded with sub-CU mode), for which onlytwo rows/columns of P_(N) are added to P_(C). In this case weightingfactors {1/4, 1/8} are used for P_(N) and weighting factors {3/4, 7/8}are used for P_(C). For P_(N) generated based on motion vectors ofvertically (horizontally) neighboring sub-block, samples in the same row(column) of P_(N) are added to P_(C) with a same weighting factor.

In the JEM, for a CU with size less than or equal to 256 luma samples, aCU level flag is signalled to indicate whether OBMC is applied or notfor the current CU. For the CUs with size larger than 256 luma samplesor not coded with AMVP mode, OBMC is applied by default. At the encoder,when OBMC is applied for a CU, its impact is taken into account duringthe motion estimation stage. The prediction signal formed by OBMC usingmotion information of the top neighboring block and the left neighboringblock is used to compensate the top and left boundaries of the originalsignal of the current CU, and then the normal motion estimation processis applied.

2.2.7. Local Illumination Compensation

Local Illumination Compensation (LIC) is based on a linear model forillumination changes, using a scaling factor a and an offset b. And itis enabled or disabled adaptively for each inter-mode coded coding unit(CU).

When LIC applies for a CU, a least square error method is employed toderive the parameters a and b by using the neighboring samples of thecurrent CU and their corresponding reference samples. More specifically,as illustrated in FIG. 15, the subsampled (2:1 subsampling) neighboringsamples of the CU and the corresponding samples (identified by motioninformation of the current CU or sub-CU) in the reference picture areused. The IC parameters are derived and applied for each predictiondirection separately.

When a CU is coded with merge mode, the LIC flag is copied fromneighboring blocks, in a way similar to motion information copy in mergemode; otherwise, an LIC flag is signalled for the CU to indicate whetherLIC applies or not.

When LIC is enabled for a picture, addtional CU level RD check is neededto determine whether LIC is applied or not for a CU. When LIC is enabledfor a CU, mean-removed sum of absolute diffefference (MR-SAD) andmean-removed sum of absolute Hadamard-transformed difference (MR-SATD)are used, instead of SAD and SATD, for integer pel motion search andfractional pel motion search, respectively.

To reduce the encoding complexity, the following encoding scheme isapplied in the JEM: LIC is disabled for the entire picture when there isno obvious illumination change between a current picture and itsreference pictures. To identify this situation, histograms of a currentpicture and every reference picture of the current picture arecalculated at the encoder. If the histogram difference between thecurrent picture and every reference picture of the current picture issmaller than a given threshold, LIC is disabled for the current picture;otherwise, LIC is enabled for the current picture.

2.2.8. Hybrid Intra and Inter Prediction

In JVET-L0100, multi-hypothesis prediction is proposed, wherein hybridintra and inter prediction is one way to generate multiple hypotheses.

When the multi-hypothesis prediction is applied to improve intra mode,multi-hypothesis prediction combines one intra prediction and one mergeindexed prediction. In a merge CU, one flag is signaled for merge modeto select an intra mode from an intra candidate list when the flag istrue. For luma component, the intra candidate list is derived from 4intra prediction modes including DC, planar, horizontal, and verticalmodes, and the size of the intra candidate list can be 3 or 4 dependingon the block shape. When the CU width is larger than the double of CUheight, horizontal mode is exclusive of the intra mode list and when theCU height is larger than the double of CU width, vertical mode isremoved from the intra mode list. One intra prediction mode selected bythe intra mode index and one merge indexed prediction selected by themerge index are combined using weighted average. For chroma component,DM is always applied without extra signaling. The weights for combiningpredictions are described as follow. When DC or planar mode is selected,or the CB width or height is smaller than 4, equal weights are applied.For those CBs with CB width and height larger than or equal to 4, whenhorizontal/vertical mode is selected, one CB is firstvertically/horizontally split into four equal-area regions. Each weightset, denoted as (w_intra₁, w_inter₁), where i is from 1 to 4 and(w_intra₁, w_inter₁)=(6, 2), (w_intra₂, w_inter₂)=(5, 3), (w_intra₃,w_inter₃)=(3, 5), and (w_intra4, w_inter4)=(2, 6), will be applied to acorresponding region. (w_intra₁, w_inter₁) is for the region closest tothe reference samples and (w_intra4, w_inter4) is for the regionfarthest away from the reference samples. Then, the combined predictioncan be calculated by summing up the two weighted predictions andright-shifting 3 bits. Moreover, the intra prediction mode for the intrahypothesis of predictors can be saved for reference of the followingneighboring CUs.

2.2.9. Triangular Prediction Unit Mode

The concept of the triangular prediction unit mode is to introduce a newtriangular partition for motion compensated prediction. As shown in FIG.16, it splits a CU into two triangular prediction units (PUs), in eitherdiagonal or inverse diagonal direction. Each triangular prediction unitin the CU is inter-predicted using its own uni-prediction motion vectorand reference frame index which are derived from a uni-predictioncandidate list. An adaptive weighting process is performed to thediagonal edge after predicting the triangular prediction units. Then,the transform and quantization process are applied to the whole CU. Itis noted that this mode is only applied to skip and merge modes.

Uni-prediction candidate list

The uni-prediction candidate list consists of five uni-prediction motionvector candidates. It is derived from seven neighboring blocks includingfive spatial neighboring blocks (1 to 5) and two temporal co-locatedblocks (6 to 7), as shown in

FIG. 17. The motion vectors of the seven neighboring blocks arecollected and put into the uni-prediction candidate list according inthe order of uni-prediction motion vectors, L₀ motion vector ofbi-prediction motion vectors, L1 motion vector of bi-prediction motionvectors, and averaged motion vector of the L₀ and L1 motion vectors ofbi-prediction motion vectors. If the number of candidates is less thanfive, zero motion vector is added to the list.

Adaptive Weighting Process

After predicting each triangular prediction unit, an adaptive weightingprocess is applied to the diagonal edge between the two triangularprediction units to derive the final prediction for the whole CU. Twoweighting factor groups are listed as follows:

-   1^(st) weighting factor group: {7/8, 6/8, 4/8, 2/8, 1/8} and {7/8,    4/8, 1/8} are used for the luminance and the chrominance samples,    respectively;-   2^(nd) weighting factor group: {7/8, 6/8, 5/8, 4/8, 3/8, 2/8, 1/8}    and {6/8, 4/8, 2/8} are used for the luminance and the chrominance    samples, respectively.

One weighting factor group is selected based on the comparison of themotion vectors of two triangular prediction units. The 2^(nd) weightingfactor group is used when the reference pictures of the two triangularprediction units are different from each other or their motion vectordifference is larger than 16 pixels. Otherwise, the 1^(st) weightingfactor group is used. An example is shown in FIG. 18.

Motion Vector Storage

The motion vectors (Mv1 and Mv2 in FIG. 19) of the triangular predictionunits are stored in 4×4 grids. For each 4×4 grid, either uni-predictionor bi-prediction motion vector is stored depending on the position ofthe 4×4 grid in the CU. As shown in FIG. 19, uni-prediction motionvector, either Mv1 or Mv2, is stored for the 4×4 grid located in thenon-weighted area. On the other hand, a bi-prediction motion vector isstored for the 4×4 grid located in the weighted area. The bi-predictionmotion vector is derived from Mv1 and Mv2 according to the followingrules:

1. In the case that Mv1 and Mv2 have motion vector from differentdirections (L₀ or L1), Mv1 and Mv2 are simply combined to form thebi-prediction motion vector.

2. In the case that both Mv1 and Mv2 are from the same L₀ (or L1)direction,

2.a. If the reference picture of Mv2 is the same as a picture in the L1(or L₀) reference picture list, Mv2 is scaled to the picture. Mv1 andthe scaled Mv2 are combined to form the bi-prediction motion vector.

2.b. If the reference picture of Mv1 is the same as a picture in the L1(or L₀) reference picture list, Mv1 is scaled to the picture. The scaledMv1 and Mv2 are combined to form the bi-prediction motion vector.

2.c. Otherwise, only Mv1 is stored for the weighted area.

2.2.10. Affine Motion Compensation Prediction

In HEVC, only translation motion model is applied for motioncompensation prediction (MCP). While in the real world, there are manykinds of motion, e.g. zoom in/out, rotation, perspective motions and heother irregular motions. In the JEM, a simplified affine transformmotion compensation prediction is applied. As shown in FIG. 20, theaffine motion field of the block is described by two control pointmotion vectors.

The motion vector field (MVF) of a block is described by the followingequation:

$\begin{matrix}\left\{ \begin{matrix}{v_{x} = {{\frac{\left( {v_{1x} - v_{0x}} \right)}{w}x} - {\frac{\left( {v_{1y} - v_{0y}} \right)}{w}y} + v_{0x}}} \\{v_{y} = {{\frac{\left( {v_{1y} - v_{0y}} \right)}{w}x} + {\frac{\left( {v_{1x} - v_{0x}} \right)}{w}y} + v_{0y}}}\end{matrix} \right. & {{Eq}.\mspace{14mu} 6}\end{matrix}$

Where (v_(0x), v_(0y)) is motion vector of the top-left corner controlpoint, and (v_(1x), v_(1y)) is motion vector of the top-right cornercontrol point.

In order to further simplify the motion compensation prediction,sub-block based affine transform prediction is applied. The sub-blocksize M×N is derived as in Eq. (7), where MvPre is the motion vectorfraction accuracy (1/16 in JEM), (v_(2x), v_(2y)) is motion vector ofthe bottom-left control point, calculated according to Eq. (6).

$\begin{matrix}\left\{ \begin{matrix}{M = {{clip}\; 3\ \left( {4,w,\frac{w \times {MvPre}}{\max\left( {{{abs}\left( {v_{1x} - v_{0x}} \right)},{{abs}\left( {v_{1y} - v_{0y}} \right)}} \right)}} \right)}} \\{N = {{clip}\; 3\ \left( {4,h,\frac{h \times {MvPre}}{\max\left( {{{abs}\left( {v_{2x} - v_{0x}} \right)},{{abs}\left( {v_{2y} - v_{0y}} \right)}} \right)}} \right)}}\end{matrix} \right. & {{Eq}.\mspace{14mu}(7)}\end{matrix}$

After derived by Eq. (7), M and N should be adjusted downward ifnecessary to make it a divisor of w and h, respectively.

To derive motion vector of each M×N sub-block, the motion vector of thecenter sample of each sub-block, as shown in FIG. 21, is calculatedaccording to Equation 1, and rounded to 1/16 fraction accuracy. Then themotion compensation interpolation filters mentioned in section [00150]are applied to generate the prediction of each sub-block with derivedmotion vector.

After MCP, the high accuracy motion vector of each sub-block is roundedand saved as the same accuracy as the normal motion vector.

2.2.10.1. AF_INTER Mode

In the JEM, there are two affine motion modes: AF_INTER mode andAF_MERGE mode. For CUs with both width and height larger than 8,AF_INTER mode can be applied. An affine flag in CU level is signalled inthe bitstream to indicate whether AF_INTER mode is used. In this mode, acandidate list with motion vector pair {(v₀, v₁)|v₀={v_(A), v_(B),v_(C)}v₁={v_(D), v_(E)}} is constructed using the neighbour blocks. Asshown in FIG. 23, v₀ is selected from the motion vectors of the block A,B or C. The motion vector from the neighbour block is scaled accordingto the reference list and the relationship among the POC of thereference for the neighbour block, the POC of the reference for thecurrent CU and the POC of the current CU. And the approach to select v₁from the neighbour block D and E is similar. If the number of candidatelist is smaller than 2, the list is padded by the motion vector paircomposed by duplicating each of the AMVP candidates. When the candidatelist is larger than 2, the candidates are firstly sorted according tothe consistency of the neighboring motion vectors (similarity of the twomotion vectors in a pair candidate) and only the first two candidatesare kept. An RD cost check is used to determine which motion vector paircandidate is selected as the control point motion vector prediction(CPMVP) of the current CU. And an index indicating the position of theCPMVP in the candidate list is signalled in the bitstream. After theCPMVP of the current affine CU is determined, affine motion estimationis applied and the control point motion vector (CPMV) is found. Then thedifference of the CPMV and the CPMVP is signalled in the bitstream.

In AF_INTER mode, when 4/6 parameter affine mode is used, 2/3 controlpoints are required, and therefore 2/3 MVD needs to be coded for thesecontrol points, as shown in FIG. 22. In JVET-K0337, it is proposed toderive the MV as follows, i.e., mvd₁ and mvd2 are predicted from mvd₀.

$\begin{matrix}{{mv}_{0} = {\overset{\_}{{mv}_{0}} + {mvd}_{0}}} & {{Eq}.\mspace{14mu}(8)} \\{{mv}_{1} = {\overset{\_}{{mv}_{1}} + {mvd}_{1} + {mvd}_{0}}} & {{Eq}.\mspace{14mu}(9)} \\{{mv}_{2} = {\overset{\_}{{mv}_{2}} + {mvd}_{2} + {mvd}_{0}}} & {{Eq}.\mspace{14mu}(10)}\end{matrix}$

Wherein mv _(i), mvd_(i) and mv₁ are the predicted motion vector, motionvector difference and motion vector of the top-left pixel (i=0),top-right pixel (i=1) or left-bottom pixel (i=2) respectively, as shownin FIG. 22. Please note that the addition of two motion vectors (e.g.,mvA(xA, yA) and mvB(xB, yB)) is equal to summation of two componentsseparately, that is, newMV=mvA+mvB and the two components of newMV isset to (xA+xB) and (yA+yB), respectively.

2.2.10.2. Fast Affine ME Algorithm in AF_INTER Mode

In affine mode, MV of 2 or 3 control points needs to be determinedjointly. Directly searching the multiple MVs jointly is computationallycomplex. A fast affine ME algorithm is proposed and is adopted intoVTM/BMS.

The fast affine ME algorithm is described for the 4-parameter affinemodel, and the idea can be extended to 6-parameter affine model.

$\begin{matrix}\left\{ \begin{matrix}{x^{\prime} = {{ax} + {by} + c}} \\{y^{\prime} = {{- {bx}} + {ay} + d}}\end{matrix} \right. & {{Eq}.\mspace{11mu}(11)} \\\left\{ \begin{matrix}{{mv}_{({x,y})}^{h} = {{x^{\prime} - x} = {{\left( {a - 1} \right)x} + {by} + c}}} \\{{mv}_{({x,y})}^{v} = {{y^{\prime} - y} = {{- {bx}} + {\left( {a - 1} \right)y} + d}}}\end{matrix} \right. & {{Eq}.\mspace{11mu}(12)}\end{matrix}$

Replace (a−1) with a′, then the motion vector can be rewritten as:

$\begin{matrix}\left\{ \begin{matrix}{{mv}_{({x,y})}^{h} = {{x^{\prime} - x} = {{a^{\prime}x} + {by} + c}}} \\{{mv}_{({x,y})}^{v} = {{y^{\prime} - y} = {{- {bx}} + {a^{\prime}y} + d}}}\end{matrix} \right. & {{Eq}.\mspace{11mu}(13)}\end{matrix}$

Suppose motion vectors of the two controls points (0, 0) and (0, w) areknown, from Eq. (13) we can derive affine parameters:

$\begin{matrix}\left\{ \begin{matrix}{c = {mv}_{({0,0})}^{h}} \\{d = {mv}_{({0,0})}^{v}}\end{matrix} \right. & {{Eq}.\mspace{11mu}(14)}\end{matrix}$

The motion vectors can be rewritten in vector form as:

MV(p)=A(P)*MV _(C) ^(TC)   Eq. (15)

Wherein

$\begin{matrix}{{A(P)} = \begin{bmatrix}1 & x & 0 & y \\0 & y & 1 & {- x}\end{bmatrix}} & {{Eq}.\mspace{11mu}(16)} \\{{MV}_{C} = \left\lbrack {{mv}_{({0,0})}^{h}\mspace{14mu} a\mspace{20mu}{mv}_{({0,0})}^{v}\mspace{20mu} b} \right\rbrack} & {{Eq}.\mspace{11mu}(17)}\end{matrix}$

P=(x, y) is the pixel position.

At encoder, MVD of AF_INTER are derived iteratively. Denote MV^(i)(P) asthe MV derived in the ith iteration for position P and denote dMV_(C)^(i) as the delta updated for MV_(C) in the ith iteration. Then in the(i+1)th iteration:

$\begin{matrix}\begin{matrix}{{{MV}^{i + 1}(P)} = {{A(P)}*\left( {\left( {MV}_{C}^{i} \right)^{T} + \left( {dMV}_{C}^{i} \right)^{T}} \right)}} \\{= {{{A(P)}*\left( {MV}_{C}^{i} \right)^{T}} + {{A(P)}*\left( {dMV}_{C}^{i} \right)^{T}}}} \\{= {{{MV}^{i}(P)} + {{A(P)}*\left( {dMV}_{C}^{i} \right)^{T}}}}\end{matrix} & {{Eq}.\mspace{11mu}(18)}\end{matrix}$

Denote Pic_(ref) as the reference picture and denote Pic_(cur) as thecurrent picture and denote Q=P+MV^(i)(P). Suppose we use MSE as thematching criterion, then we need to minimize:)

min Σ_(p)(Pic_(cur)(P)−Pic_(ref)(P+MV^(i+1)(P)))²

=min Σ_(P) (Pic_(cur)(P)−Pic_(ref)(Q+A(P)*(dMV _(C) ^(i))^(T)))²   Eq.(19)

Suppose (dMV_(C) ^(i))^(T) is small enough, we can rewritePic_(ref)(Q+A(P)*(dMV_(C) ^(i))^(T)) approximately as follows with 1 thorder Taylor expansion.

$\begin{matrix}{{{Pic}_{ref}\left( {Q + {{A(P)}*\left( {dMV}_{C}^{i} \right)^{T}}} \right)} \approx {{{Pic}_{ref}(Q)} + {{{Pic}_{ref}^{\prime}(Q)}*{A(P)}*\left( {dMV}_{C}^{i} \right)^{T}}}} & {{Eq}.\mspace{11mu}(20)} \\{\mspace{79mu}{{{{Wherein}\mspace{14mu}{{Pic}_{ref}^{\prime}(Q)}} = {{{\left\lbrack {\frac{{dPic}_{ref}(Q)}{dx}\frac{{dPic}_{ref}(Q)}{dy}} \right\rbrack.\mspace{14mu}\mspace{85mu}{Denote}}\mspace{14mu}{E^{i + 1}(P)}} = {{{Pic}_{cur}(P)} - {{Pic}_{ref}(Q)}}}},{{\min{\sum_{P}\left( {{{Pic}_{cur}(P)} - {{Pic}_{ref}(Q)} - {{{Pic}_{ref}^{\prime}(Q)}*{A(P)}*\left( {dMV}_{C}^{i} \right)^{T}}} \right)^{2}}} = {\min{\sum_{P}\left( {{E^{i + 1}(P)} - {{{Pic}_{ref}^{\prime}(Q)}*{A(P)}*\left( {dMV}_{c}^{i} \right)^{T}}} \right)^{2}}}}}} & {{Eq}.\mspace{11mu}(21)}\end{matrix}$

We can derive dMV_(C) ^(i) by setting the derivative of the errorfunction to zero. Then we can then calculate delta MV of the controlpoints (0, 0) and (0, w) according to A(P)*(dMV_(C) ^(i))^(T),

dMV _((0, 0))^(h) =dMV _(C) ^(i)[0]  Eq. (22)

dMV _((0, w))^(h) =dMV _(C) ^(i)[1]*w+dMV _(C) ^(i)[2]  Eq. (23)

dMV _((0, 0))^(v) =dMV _(C) ^(i)[2]  Eq. (24)

dMV _((0, w))^(v) =dMV _(C) ^(i)[3]*w+dMV _(C) ^(i)[2]  Eq. (25)

Suppose such MVD derivation process is iterated by n times, then thefinal MVD is calculated as follows,

fdMV _((0, 0))^(h)=Σ_(i=0) ^(n-1) dMV _(C) ^(i)[0]  Eq. (26)

fdMV _((0, w))^(h)=Σ_(i=0) ^(n-1) dMV _(C) ^(i)[1]*w+Σ _(i=0) ^(n-1) dMV_(C) ^(i)[0]  Eq. (27)

fdMV _((0, 0))^(v)=Σ_(i=0) ^(n-1) dMV _(C) ^(i)[0]  Eq. (28)

fdMV _((0, w))^(v)=Σ_(i=0) ^(n-1) dMV _(C) ^(i)[3]*w+Σ _(i=0) ^(n-1) dMV_(C) ^(i)[2]  Eq. (29)

With JVET-K0337, i.e., predicting delta MV of control point (0, w),denoted by mvdi from delta MV of control point (0, 0), denoted by mvdo,now actually only (Σ_(i=0) ^(n-1)dMV_(C) ^(i)[1]*w, −Σ_(i=0)^(n-1)−dMV_(C) ^(i)[3]*w) is encoded formvdi.

2.2.10.3. AF_MERGE mode

When a CU is applied in AF_MERGE mode, it gets the first block codedwith affine mode from the valid neighbour reconstructed blocks. And theselection order for the candidate block is from left, above, aboveright, left bottom to above left as shown in FIG. 24A, the motionvectors v₂, v₃ and v₄ of the top left corner, above right corner andleft bottom corner of the CU which contains the block A are derived. Andthe motion vector v₀ of the top left corner on the current CU iscalculated according to v₂, v₃ and v₄. Secondly, the motion vector v₁ ofthe above right of the current CU is calculated.

After the CPMV of the current CU v₀ and v₁ are derived, according to thesimplified affine motion model Equation 1, the MVF of the current CU isgenerated. In order to identify whether the current CU is coded withAF_MERGE mode, an affine flag is signalled in the bitstream when thereis at least one neighbour block is coded in affine mode.

FIG. 24A and 24B show examples of candidates for AF_MERGE

In JVET-L0366, which was planned to be adopted into VTM 3.0, an affinemerge candidate list is constructed with following steps:

(1) Insert inherited affine candidates

Inherited affine candidate means that the candidate is derived from theaffine motion model of its valid neighbor affine coded block. In thecommon base, as shown in FIG. 25, the scan order for the candidatepositions is: A1, B1, B0, A0 and B2.

After a candidate is derived, full pruning process is performed to checkwhether same candidate has been inserted into the list. If a samecandidate exists, the derived candidate is discarded.

(2) Insert constructed affine candidates

If the number of candidates in affine merge candidate list is less thanMaxNumAffineCand (set to 5 in this contribution), constructed affinecandidates are inserted into the candidate list. Constructed affinecandidate means the candidate is constructed by combining the neighbormotion information of each control point.

The motion information for the control points is derived firstly fromthe specified spatial neighbors and temporal neighbor shown in FIG. 25.CPk (k=1, 2, 3, 4) represents the k-th control point. A0, A1, A2, B0,B1, B2 and B3 are spatial positions for predicting CPk (k=1, 2, 3); T istemporal position for predicting CP4.

The coordinates of CP1, CP2, CP3 and CP4 is (0, 0), (W, 0), (H, 0) and(W, H), respectively, where W and H are the width and height of currentblock.

The motion information of each control point is obtained according tothe following priority order:

For CP1, the checking priority is B2→B3→A2. B2 is used if it isavailable. Otherwise, if B2 is available, B3 is used. If both B2 and B3are unavailable, A2 is used. If all the three candidates areunavailable, the motion information of CP1 cannot be obtained.

For CP2, the checking priority is B1→B0.

For CP3, the checking priority is A1→A0.

For CP4, T is used.

Secondly, the combinations of controls points are used to construct anaffine merge candidate.

Motion information of three control points are needed to construct a6-parameter affine candidate. The three control points can be selectedfrom one of the following four combinations ({CP1, CP2, CP4}, {CP1, CP2,CP3}, {CP2, CP3, CP4}, {CP1, CP3, CP4}). Combinations {CP1, CP2, CP3},{CP2, CP3, CP4}, {CP1, CP3, CP4} will be converted to a 6-parametermotion model represented by top-left, top-right and bottom-left controlpoints.

Motion information of two control points are needed to construct a4-parameter affine candidate. The two control points can be selectedfrom one of the following six combinations ({CP1, CP4}, {CP2, CP3},{CP1, CP2}, {CP2, CP4}, {CP1, CP3}, {CP3, CP4}). Combinations {CP1,CP4}, {CP2, CP3}, {CP2, CP4}, {CP1, CP3}, {CP3, CP4} will be convertedto a 4-parameter motion model represented by top-left and top-rightcontrol points.

The combinations of constructed affine candidates are inserted into tocandidate list as following order:

-   {CP1, CP2, CP3}, {CP1, CP2, CP4}, {CP1, CP3, CP4}, {CP2, CP3, CP4},    {CP1, CP2}, {CP1, CP3}, {CP2, CP3}, {CP1, CP4}, {CP2, CP4}, {CP3,    CP4}

For reference list X (X being 0 or 1) of a combination, the referenceindex with highest usage ratio in the control points is selected as thereference index of list X, and motion vectors point to differencereference picture will be scaled.

After a candidate is derived, full pruning process is performed to checkwhether same candidate has been inserted into the list. If a samecandidate exists, the derived candidate is discarded.

(3) Padding with zero motion vectors

If the number of candidates in affine merge candidate list is less than5, zero motion vectors with zero reference indices are insert into thecandidate list, until the list is full.

2.2.11. Pattern Matched Motion Vector Derivation

Pattern matched motion vector derivation (PMMVD) mode is a special mergemode based on Frame-Rate Up Conversion (FRUC) techniques. With thismode, motion information of a block is not signalled but derived atdecoder side.

A FRUC flag is signalled for a CU when its merge flag is true. When theFRUC flag is false, a merge index is signalled and the regular mergemode is used. When the FRUC flag is true, an additional FRUC mode flagis signalled to indicate which method (bilateral matching or templatematching) is to be used to derive motion information for the block.

At encoder side, the decision on whether using FRUC merge mode for a CUis based on RD cost selection as done for normal merge candidate. Thatis the two matching modes (bilateral matching and template matching) areboth checked for a CU by using RD cost selection. The one leading to theminimal cost is further compared to other CU modes. If a FRUC matchingmode is the most efficient one, FRUC flag is set to true for the CU andthe related matching mode is used.

Motion derivation process in FRUC merge mode has two steps. A CU-levelmotion search is first performed, then followed by a Sub-CU level motionrefinement. At CU level, an initial motion vector is derived for thewhole CU based on bilateral matching or template matching. First, a listof MV candidates is generated and the candidate which leads to theminimum matching cost is selected as the starting point for further CUlevel refinement. Then a local search based on bilateral matching ortemplate matching around the starting point is performed and the MVresults in the minimum matching cost is taken as the MV for the wholeCU. Subsequently, the motion information is further refined at sub-CUlevel with the derived CU motion vectors as the starting points.

For example, the following derivation process is performed for a W×H CUmotion information derivation. At the first stage, MV for the whole W×HCU is derived. At the second stage, the CU is further split into M×Msub-CUs. The value of M is calculated as in (16), D is a predefinedsplitting depth which is set to 3 by default in the JEM. Then the MV foreach sub-CU is derived.

$\begin{matrix}{M = {\max\left\{ {4,{\min\left\{ {\frac{M}{2^{D}},\frac{N}{2^{D}}} \right\}}} \right\}}} & {{Eq}.\mspace{11mu}(30)}\end{matrix}$

As shown in the FIG. 26, the bilateral matching is used to derive motioninformation of the current CU by finding the closest match between twoblocks along the motion trajectory of the current CU in two differentreference pictures. Under the assumption of continuous motiontrajectory, the motion vectors MV0 and MV1 pointing to the two referenceblocks shall be proportional to the temporal distances, i.e., TD0 andTD1, between the current picture and the two reference pictures. As aspecial case, when the current picture is temporally between the tworeference pictures and the temporal distance from the current picture tothe two reference pictures is the same, the bilateral matching becomesmirror based bi-directional MV.

As shown in FIG. 27, template matching is used to derive motioninformation of the current CU by finding the closest match between atemplate (top and/or left neighboring blocks of the current CU) in thecurrent picture and a block (same size to the template) in a referencepicture. Except the aforementioned FRUC merge mode, the templatematching is also applied to AMVP mode. In the JEM, as done in HEVC, AMVPhas two candidates. With template matching method, a new candidate isderived. If the newly derived candidate by template matching isdifferent to the first existing AMVP candidate, it is inserted at thevery beginning of the AMVP candidate list and then the list size is setto two (meaning remove the second existing AMVP candidate). When appliedto AMVP mode, only CU level search is applied.

2.2.11.1. CU level MV Candidate Set

The MV candidate set at CU level consists of:

(i) Original AMVP candidates if the current CU is in AMVP mode

(ii) all merge candidates,

(iii) several MVs in the interpolated MV field, which is introduced insection [00289].

(iv) top and left neighboring motion vectors

When using bilateral matching, each valid MV of a merge candidate isused as an input to generate a MV pair with the assumption of bilateralmatching. For example, one valid MV of a merge candidate is (MVa, refa)at reference list A. Then the reference picture refb of its pairedbilateral MV is found in the other reference list B so that refa andrefb are temporally at different sides of the current picture. If such arefb is not available in reference list B, refb is determined as areference which is different from refa and its temporal distance to thecurrent picture is the minimal one in list B. After refb is determined,MVb is derived by scaling MVa based on the temporal distance between thecurrent picture and refa, refb.

Four MVs from the interpolated MV field are also added to the CU levelcandidate list. More specifically, the interpolated MVs at the position(0, 0), (W/2, 0), (0, H/2) and (W/2, H/2) of the current CU are added.

When FRUC is applied in AMVP mode, the original AMVP candidates are alsoadded to CU level MV candidate set.

At the CU level, up to 15 MVs for AMVP CUs and up to 13 MVs for mergeCUs are added to the candidate list.

2.2.11.2. Sub-CU Level MV Candidate Set

The MV candidate set at sub-CU level consists of:

(i) an MV determined from a CU-level search,

(ii) top, left, top-left and top-right neighboring MVs,

(iii) scaled versions of collocated MVs from reference pictures,

(iv) up to 4 ATMVP candidates,

(v) up to 4 STMVP candidates

The scaled MVs from reference pictures are derived as follows. All thereference pictures in both lists are traversed. The MVs at a collocatedposition of the sub-CU in a reference picture are scaled to thereference of the starting CU-level MV.

ATMVP and STMVP candidates are limited to the four first ones.

At the sub-CU level, up to 17 MVs are added to the candidate list.

2.2.11.3. Generation of Interpolated MV Field

Before coding a frame, interpolated motion field is generated for thewhole picture based on unilateral ME. Then the motion field may be usedlater as CU level or sub-CU level MV candidates.

First, the motion field of each reference pictures in both referencelists is traversed at 4×4 block level. For each 4×4 block, if the motionassociated to the block passing through a 4×4 block in the currentpicture (as shown in FIG. 28) and the block has not been assigned anyinterpolated motion, the motion of the reference block is scaled to thecurrent picture according to the temporal distance TD0 and TD1 (the sameway as that of MV scaling of TMVP in HEVC) and the scaled motion isassigned to the block in the current frame. If no scaled MV is assignedto a 4×4 block, the block's motion is marked as unavailable in theinterpolated motion field.

2.2.11.4. Interpolation and Matching Cost

When a motion vector points to a fractional sample position, motioncompensated interpolation is needed. To reduce complexity, bi-linearinterpolation instead of regular 8-tap HEVC interpolation is used forboth bilateral matching and template matching.

The calculation of matching cost is a bit different at different steps.When selecting the candidate from the candidate set at the CU level, thematching cost is the absolute sum difference (SAD) of bilateral matchingor template matching. After the starting MV is determined, the matchingcost C of bilateral matching at sub-CU level search is calculated asfollows:

C=SAD+w·(|MV _(x) −MV _(x) ^(s)|+|MV _(y) −MV _(y) ^(s)|)   Eq. (31)

where w is a weighting factor which is empirically set to 4, MV andMV^(s) indicate the current MV and the starting MV, respectively. SAD isstill used as the matching cost of template matching at sub-CU levelsearch.

In FRUC mode, MV is derived by using luma samples only. The derivedmotion will be used for both luma and chroma for MC inter prediction.After MV is decided, final MC is performed using 8-taps interpolationfilter for luma and 4-taps interpolation filter for chroma.

2.2.11.5. MV Refinement

MV refinement is a pattern based MV search with the criterion ofbilateral matching cost or template matching cost. In the JEM, twosearch patterns are supported—an unrestricted center-biased diamondsearch (UCBDS) and an adaptive cross search for MV refinement at the CUlevel and sub-CU level, respectively. For both CU and sub-CU level MVrefinement, the MV is directly searched at quarter luma sample MVaccuracy, and this is followed by one-eighth luma sample MV refinement.The search range of MV refinement for the CU and sub-CU step are setequal to 8 luma samples.

2.2.11.6. Selection of Prediction Direction in Template Matching FRUCMerge Mode

In the bilateral matching merge mode, bi-prediction is always appliedsince the motion information of a CU is derived based on the closestmatch between two blocks along the motion trajectory of the current CUin two different reference pictures. There is no such limitation for thetemplate matching merge mode. In the template matching merge mode, theencoder can choose among uni-prediction from list0, uni-prediction fromlist1 or bi-prediction for a CU. The selection is based on a templatematching cost as follows:

-   -   If costBi<=factor*min(cost0, cost1)        -   bi-prediction is used;    -   Otherwise, if cost0<=cost1        -   uni-prediction from list0 is used;    -   Otherwise,        -   uni-prediction from list1 is used;

where cost0 is the SAD of list0 template matching, cost1 is the SAD oflist1 template matching and costBi is the SAD of bi-prediction templatematching. The value of factor is equal to 1.25, which means that theselection process is biased toward bi-prediction.

The inter prediction direction selection is only applied to the CU-leveltemplate matching process.

2.2.12. Generalized Bi-Prediction

In conventional bi-prediction, the predictors from L₀ and L1 areaveraged to generate the final predictor using the equal weight 0.5. Thepredictor generation formula is shown as in Eq. (32):

P _(TraditionalBiPred)=(P _(L0) +P _(L1)+RoundingOffset)>>shiftNum   Eq.(32)

In Eq. (32), P_(TraditionalBiPred) is the final predictor for theconventional bi-prediction, P_(L0) and P_(L1) are predictors from L₀ andL1, respectively, and RoundingOffset and shiftNum are used to normalizethe final predictor.

Generalized Bi-prediction (GBI) proposed to allow applying differentweights to predictors from L₀ and L1. The predictor generation is shownin Eq. (33).

P_(GBi)=

((1−w ₁)×P _(L0) +w ₁ ×P _(L1)+RoundingOffset_(GBi))>>shiftNum_(GBi) Eq.(33)

In Eq. (33), P_(GBi) is the final predictor of GBi. (1−w₁) and m are theselected GBI weights applied to the predictors of L₀ and L1,respectively. RoundingOffset_(GBi) and shiftNum_(GBi) are used tonormalize the final predictor in GBi.

The supported weights of w₁ is {−1/4, 3/8, 1/2, 5/8, 5/4}. Oneequal-weight set and four unequal-weight sets are supported. For theequal-weight case, the process to generate the final predictor isexactly the same as that in the conventional bi-prediction mode. For thetrue bi-prediction cases in random access (RA) condition, the number ofcandidate weight sets is reduced to three.

For advanced motion vector prediction (AMVP) mode, the weight selectionin GBI is explicitly signaled at CU-level if this CU is coded bybi-prediction. For merge mode, the weight selection is inherited fromthe merge candidate. In this proposal, GBI supports DMVR to generate theweighted average of template as well as the final predictor for BMS-1.0.

2.2.13. Multi-Hypothesis Inter Prediction

In the multi-hypothesis inter prediction mode, one or more additionalprediction signals are signaled, in addition to the conventional uni/biprediction signal. The resulting overall prediction signal is obtainedby sample-wise weighted superposition. With the uni/bi prediction signalp_(uni/bi) and the first additional inter prediction signal/hypothesish₃, the resulting prediction signal p₃ is obtained as follows:

p ₃=(1−α)p _(uni/bi) +αh ₃   Eq. (34)

The changes to the prediction unit syntax structure are shown as boldtext below:

prediction unit( x0, y0, nPbW, nPbH ) { Descriptor  ...  if( !cu_skip_flag[ x0 ][ y0 ] ) {   i = 0   readMore = 1   while( i <MaxNumAdditionalHypotheses   && readMore ) {   additional_hypothesis_flag[ x0 ][ y0 ][ i ] ae(v)    if(additional_hypothesis_flag[ x0 ][ y0 ][ i ] ) {     ref_idx_add_hyp[ x0][ y0 ][ i ] ae(v)     mvd_coding( x0, y0, 2+i )     mvp_add_hyp_flag[x0 ][ y0 ][ i ] ae(v)     add_hyp_weight_idx[ x0 ][ y0 ][ i ] ae(v)    }   readMore = additional_hypothesis_flag[ 0 ][ y0 ][ i ]    i++   }  } }

The weighting factor a is specified by the syntax elementadd_hyp_weight_idx, according to the following mapping:

add_hyp_weight_idx α 0  ¼ 1 −⅛

Note that for the additional prediction signals, the concept ofprediction list0/list1 is abolished, and instead one combined list isused. This combined list is generated by alternatingly insertingreference frames from list0 and list1 with increasing reference index,omitting reference frames which have already been inserted, such thatdouble entries are avoided.

Analogously to above, more than one additional prediction signals can beused. The resulting overall prediction signal is accumulated iterativelywith each additional prediction signal.

p _(n+1)=(1−α_(n+1))p _(n)+α_(n+1) h _(n+1)   Eq. (35)

The resulting overall prediction signal is obtained as the last p_(n)(i.e., the p_(n) having the largest index n).

Note that also for inter prediction blocks using MERGE mode (but notSKIP mode), additional inter prediction signals can be specified.Further note, that in case of MERGE, not only the uni/bi predictionparameters, but also the additional prediction parameters of theselected merging candidate can be used for the current block.

2.2.14. Multi-Hypothesis Prediction for Uni-Prediction of AMVP Mode

When the multi-hypothesis prediction is applied to improveuni-prediction of AMVP mode, one flag is signaled to enable or disablemulti-hypothesis prediction for inter_dir equal to 1 or 2, where 1, 2,and 3 represent list 0, list 1, and bi-prediction, respectively.Moreover, one more merge index is signaled when the flag is true. Inthis way, multi-hypothesis prediction turns uni-prediction intobi-prediction, where one motion is acquired using the original syntaxelements in AMVP mode while the other is acquired using the mergescheme. The final prediction uses 1:1 weights to combine these twopredictions as in bi-prediction. The merge candidate list is firstderived from merge mode with sub-CU candidates (e.g., affine,alternative temporal motion vector prediction (ATMVP)) excluded. Next,it is separated into two individual lists, one for list 0 (L0)containing all L₀ motions from the candidates, and the other for list 1(L1) containing all L1 motions. After removing redundancy and fillingvacancy, two merge lists are generated for L₀ and L1 respectively. Thereare two constraints when applying multi-hypothesis prediction forimproving AMVP mode. First, it is enabled for those CUs with the lumacoding block (CB) area larger than or equal to 64. Second, it is onlyapplied to L1 when in low delay B pictures.

2.2.15. Multi-Hypothesis Prediction for Skip/merge Mode

When the multi-hypothesis prediction is applied to skip or merge mode,whether to enable multi-hypothesis prediction is explicitly signaled. Anextra merge indexed prediction is selected in addition to the originalone. Therefore, each candidate of multi-hypothesis prediction implies apair of merge candidates, containing one for the 1^(st) merge indexedprediction and the other for the 2^(nd) merge indexed prediction.However, in each pair, the merge candidate for the 2^(nd) merge indexedprediction is implicitly derived as the succeeding merge candidate(i.e., the already signaled merge index plus one) without signaling anyadditional merge index. After removing redundancy by excluding thosepairs, containing similar merge candidates and filling vacancy, thecandidate list for multi-hypothesis prediction is formed. Then, motionsfrom a pair of two merge candidates are acquired to generate the finalprediction, where 5:3 weights are applied to the 1^(st) and 2^(nd) mergeindexed predictions, respectively. Moreover, a merge or skip CU withmulti-hypothesis prediction enabled can save the motion information ofthe additional hypotheses for reference of the following neighboring CUsin addition to the motion information of the existing hypotheses. Notethat sub-CU candidates (e.g., affine, ATMVP) are excluded from thecandidate list, and for low delay B pictures, multi-hypothesisprediction is not applied to skip mode. Moreover, when multi-hypothesisprediction is applied to merge or skip mode, for those CUs with CU widthor CU height less than 16, or those CUs with both CU width and CU heightequal to 16, bi-linear interpolation filter is used in motioncompensation for multiple hypotheses. Therefore, the worst-casebandwidth (required access samples per sample) for each merge or skip CUwith multi-hypothesis prediction enabled is calculated in Table 1 andeach number is less than half of the worst-case bandwidth for each 4×4CU with multi-hypothesis prediction disabled.

2.2.16. Ultimate Motion Vector Expression

Ultimate motion vector expression (UMVE) is used for either skip ormerge modes with a proposed motion vector expression method.

UMVE re-uses merge candidate as same as using in VVC. Among the mergecandidates, a candidate can be selected, and is further expanded by theproposed motion vector expression method.

UMVE provides a new motion vector expression with simplified signaling.The expression method includes starting point, motion magnitude, andmotion direction.

FIG. 29 shows an example of UMVE Search Process

FIG. 30 shows examples of UMVE Search Points.

This proposed technique uses a merge candidate list as it is. But onlycandidates which are default merge type (MRG_TYPE_DEFAULT_N) areconsidered for UMVE's expansion.

Base candidate index defines the starting point. Base candidate indexindicates the best candidate among candidates in Table 2 as follows.

TABLE 3 Example Base candidate IDX Base candidate IDX 0 1 2 3 N^(th) MVP1^(st) MVP 2^(nd) MVP 3^(rd) MVP 4^(th) MVP

If the number of base candidate is equal to 1, Base candidate IDX is notsignaled.

Distance index is motion magnitude information. Distance index indicatesthe pre-defined distance from the starting point information.Pre-defined distance is as shown in Table 3 as follows:

TABLE 3 Example Distance IDX Distance 0 1 2 3 4 5 6 7 IDX Pixel 1/4-1/2- 1-pel 2-pel 4-pel 8-pel 16-pel 32-pel distance pel pel

Direction index represents the direction of the MVD relative to thestarting point. The direction index can represent of the four directionsas shown in Table 4 below.

TABLE 4 Example Direction IDX Direction IDX 00 01 10 11 x-axis + − N/AN/A y-axis N/A N/A + −

UMVE flag is singnaled right after sending a skip flag and merge flag.If skip and merge flag is true, UMVE flag is parsed. If UMVE flage isequal to 1, UMVE syntaxes are parsed. But, if not 1, AFFINE flag isparsed. If AFFINE flag is equal to 1, that is AFFINE mode, But, if not1, skip/merge index is parsed for VTM's skip/merge mode.

Additional line buffer due to UMVE candidates is not needed. Because askip/merge candidate of software is directly used as a base candidate.Using input UMVE index, the supplement of MV is decided right beforemotion compensation. There is no need to hold long line buffer for this.

2.2.17. Affine Merge Mode with Prediction Offsets

UMVE is extended to affine merge mode, also referred to as UMVE affinemode thereafter. The proposed method selects the first available affinemerge candidate as a base predictor. Then it applies a motion vectoroffset to each control point's motion vector value from the basepredictor. If there's no affine merge candidate available, this proposedmethod will not be used.

The selected base predictor's inter prediction direction, and thereference index of each direction is used without change.

In the current implementation, the current block's affine model isassumed to be a 4-parameter model, only 2 control points need to bederived. Thus, only the first 2 control points of the base predictorwill be used as control point predictors.

For each control point, a zero_MVD flag is used to indicate whether thecontrol point of current block has the same MV value as thecorresponding control point predictor. If zero_MVD flag is true, there'sno other signaling needed for the control point. Otherwise, a distanceindex and an offset direction index is signaled for the control point.

A distance offset table with size of 5 is used as shown in the tablebelow. Distance index is signaled to indicate which distance offset touse. The mapping of distance index and distance offset values is shownin Table 5.

TABLE 5 Example Distance offset table Distance IDX 0 1 2 3 4Distance-offset 1/2-pel 1-pel 2-pel 4-pel 8-pel

FIG. 31 shows an example of distance index and distance offset mapping.

The direction index can represent four directions as shown below, whereonly x or y direction may have an MV difference, but not in bothdirections.

Offset Direction IDX 00 01 10 11 x-dir-factor +1 −1 0 0 y-dir-factor 0 0+1 −1

If the inter prediction is uni-directional, the signaled distance offsetis applied on the offset direction for each control point predictor.Results will be the MV value of each control point.

For example, when base predictor is uni-directional, and the motionvector values of a control point is MVP (v_(px), v_(py)). When distanceoffset and direction index are signaled, the motion vectors of currentblock's corresponding control points will be calculated as below.

MV(v _(x) , v _(y))=MVP(v _(px) , v_(py))+MV(x-dir-factor*distance-offset, y-dir-factor*distance-offset)  Eq. (36)

If the inter prediction is bi-directional, the signaled distance offsetis applied on the signaled offset direction for control pointpredictor's L₀ motion vector; and the same distance offset with oppositedirection is applied for control point predictor's L1 motion vector.Results will be the MV values of each control point, on each interprediction direction.

For example, when base predictor is uni-directional, and the motionvector values of a control point on L₀ is MVP_(L0) (v_(opx), v_(0py)),and the motion vector of that control point on L1 is MVP_(L1) (v_(1px),v_(1py)). When distance offset and direction index are signaled, themotion vectors of current block's corresponding control points will becalculated as below.

MV _(L0)(v _(0x) , v _(0y))=MVP _(L0)(v _(0px) , v_(0py))+MV(x-dir-factor*distance-offset, y-dir-factor*distance-offset)  Eq. (37)

MV _(L1)(v _(0x) , v _(0y))=MVP _(L1)(v _(0px) , v_(0py))+MV(−x-dir-factor*distance-offset, −y-dir-factor*distance-offset)  Eq. (38)

2.2.18. Bi-Directional Optical Flow

Bi-directional Optical flow (BIO) is sample-wise motion refinement whichis performed on top of block-wise motion compensation for bi-prediction.The sample-level motion refinement doesn't use signalling.

Let I^((k)) be the luma value from reference k (k=0, 1) after blockmotion compensation, and ∂I^((k))/∂x, ∂I^((k))/∂y are horizontal andvertical components of the I^((k)) gradient, respectively. Assuming theoptical flow is valid, the motion vector field (v_(x), v_(y)) is givenby an equation:

∂I ^((k)) /∂t+v _(x) ∂I ^((k)) /∂x+v _(y) ∂I ^((k)) /∂y=0   E_(q). (39)

Combining this optical flow equation with Hermite interpolation for themotion trajectory of each sample results in a unique third-orderpolynomial that matches both the function values I^((k)) and derivatives∂I^((k))/∂x, ∂I^((k))/∂y at the ends. The value of this polynomial att=0 is the BIO prediction:

$\begin{matrix}{{pred}_{BIO} = {{1/2} \cdot \left( {I^{(0)} + I^{(1)} + {\frac{v_{x}}{2} \cdot \left( {\frac{\tau_{1}{\partial I^{(1)}}}{\partial x} - \frac{\tau_{0}{\partial I^{(0)}}}{\partial x}} \right)} + {\frac{v_{x}}{2} \cdot \left( {\frac{\tau_{1}{\partial I^{(1)}}}{\partial y} - \frac{\tau_{0}{\partial I^{(0)}}}{\partial y}} \right)}} \right)}} & {{Eq}.\mspace{11mu}(40)}\end{matrix}$

Here, τ₀ and τ₁ denote the distances to the reference frames as shown inFIG. 31. Distances τ₀ and τ₁ are calculated based on POC for Ref0 andRef1: τ₀=POC(current)−POC(RefO), τ₁=POC(Ref1)−POC(current). If bothpredictions come from the same time direction (either both from the pastor both from the future) then the signs are different (i.e., τ₀·τ₁<0).In this case, BIO is applied only if the prediction is not from the sametime moment (i.e., τ₀≠τ₁), both referenced regions have non-zero motion(MVx₀, MVy₀, MVx₁, MVy₁≠0) and the block motion vectors are proportionalto the time distance (MVx₀/MVy₀=MVy₀/MVy₁=−τ₀/τ₁).

The motion vector field (v_(x), v_(y)) is determined by minimizing thedifference Δ between values in points A and B (intersection of motiontrajectory and reference frame planes on FIG. 32). Model uses only firstlinear term of a local Taylor expansion for Δ:

Δ=(I ⁽⁰⁾ −I ⁽¹⁾ ₀ +v _(x)(τ₁ ∂I ⁽¹⁾ /∂x+τ ₀ ∂I ⁽⁰⁾ /∂x)+v _(y)(τ₁ ∂I ⁽¹⁾/∂y+τ ₀ ∂I ⁽⁰⁾ /∂y))   Eq. (41)

All values in Eq. (40) depend on the sample location (i′, j′), which wasomitted from the notation so far. Assuming the motion is consistent inthe local surrounding area, we minimize Δ inside the (2M+1)×(2M+1)square window f centered on the currently predicted point (i, j), whereM is equal to 2:

$\begin{matrix}{\left( {v_{x},v_{y}} \right) = {\underset{v_{x},v_{y}}{argmin}{\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}{\Delta^{2}\left\lbrack {i^{\prime},j^{\prime}} \right\rbrack}}}} & {{Eq}.\mspace{11mu}(42)}\end{matrix}$

For this optimization problem, the JEM uses a simplified approach makingfirst a minimization in the vertical direction and then in thehorizontal direction. This results in

$\begin{matrix}{v_{x} = {\left( {s_{1} + r} \right) > {{m?{clip}}\; 3\left( {{- {thBIO}},{thBIO},{- \frac{s_{3}}{\left( {s_{1} + r} \right)}}} \right)\text{:}\mspace{14mu} 0}}} & {{Eq}.\mspace{11mu}(43)} \\{{v_{y} = {\left( {s_{5} + r} \right) > {{m?{clip}}\; 3\left( {{- {thBIO}},{thBIO},{- \frac{s_{6} - {v_{x}{s_{2}/2}}}{\left( {s_{1} + r} \right)}}} \right)\text{:}\mspace{14mu} 0}}}\mspace{20mu}{{where},}} & {{Eq}.\mspace{11mu}(44)} \\{\mspace{79mu}{{{s_{1} = {\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)^{2}}};}\mspace{79mu}{{s_{3} = {\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}{\left( {I^{(1)} - I^{(0)}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)}}};}{{s_{2} = {\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}{\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)}}};}\mspace{79mu}{{s_{5} = {\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)^{2}}};}\mspace{79mu}{s_{6} = {\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}{\left( {I^{(1)} - I^{(0)}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)}}}}} & {{Eq}.\mspace{11mu}(45)}\end{matrix}$

In order to avoid division by zero or a very small value, regularizationparameters r and m are introduced in Eq. (43) and Eq. (44).

r=500·4^(d-8)   Eq. (46)

m=700·4^(d-8)   Eq. (47)

Here d is bit depth of the video samples.

In order to keep the memory access for BIO the same as for regularbi-predictive motion compensation, all prediction and gradients values,I^((k)), ∂I^((k))/∂x, ∂I^((k))/∂y, are calculated only for positionsinside the current block. In Eq. (45), (2M+1)×(2M+1) square window Ωcentered in currently predicted point on a boundary of predicted blockneeds to accesses positions outside of the block (as shown in FIG. 33A).In the JEM, values of I^((k)), ∂I^((k))/∂x, ∂I^((k))/∂y outside of theblock are set to be equal to the nearest available value inside theblock. For example, this can be implemented as padding, as shown in FIG.33B.

With BIO, it's possible that the motion field can be refined for eachsample. To reduce the computational complexity, a block-based design ofBIO is used in the JEM. The motion refinement is calculated based on 4×4block. In the block-based BIO, the values of s_(n) in Equation 30 of allsamples in a 4×4 block are aggregated, and then the aggregated values ofs_(n) in are used to derived BIO motion vectors offset for the 4×4block. More specifically, the following formula is used for block-basedBIO derivation:

$\begin{matrix}{\mspace{79mu}{{{s_{1,b_{k}} = {\sum\limits_{{({x,y})} \in b_{k}}{\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in {\Omega{({x,y})}}}\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)^{2}}}};}{{s_{3,b_{k}} = {\sum\limits_{{({x,y})} \in b_{k}}{\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}{\left( {I^{(1)} - I^{(0)}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)}}}};}{{s_{2,b_{k}} = {\sum\limits_{{({x,y})} \in b_{k}}{\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}{\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial x}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial x}}}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)}}}};}\mspace{79mu}{{s_{5,b_{k}} = {\sum\limits_{{({x,y})} \in b_{k}}{\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)^{2}}}};}{s_{6,b_{k}} = {\sum\limits_{{({x,y})} \in b_{k}}{\sum\limits_{{\lbrack{i^{\prime},j^{\prime}}\rbrack} \in \Omega}{\left( {I^{(1)} - I^{(0)}} \right)\left( {{\tau_{1}{{\partial I^{(1)}}/{\partial y}}} + {\tau_{0}{{\partial I^{(0)}}/{\partial y}}}} \right)}}}}}} & {{Eq}.\mspace{11mu}(48)}\end{matrix}$

where b_(k) denotes the set of samples belonging to the k-th 4×4 blockof the predicted block. s_(n) in Eq. (43) and Eq. (44) are replaced by((s_(n,bk))>>4) to derive the associated motion vector offsets.

In some cases, MV regiment of BIO might be unreliable due to noise orirregular motion. Therefore, in BIO, the magnitude of MV regiment isclipped to a threshold value thBOI. The threshold value is determinedbased on whether the reference pictures of the current picture are allfrom one direction. If all the reference pictures of the current pictureare from one direction, the value of the threshold is set to12×2^(14-d); otherwise, it is set to 12×2^(13-d).

Gradients for BIO are calculated at the same time with motioncompensation interpolation using operations consistent with HEVC motioncompensation process (2D separable FIR). The input for this 2D separableFIR is the same reference frame sample as for motion compensationprocess and fractional position (fracX, fracY) according to thefractional part of block motion vector. In case of horizontal gradient∂I/∂x signal first interpolated vertically using BIOfilterScorresponding to the fractional position fracY with de-scaling shiftd-8, then gradient filter BIOfilterG is applied in horizontal directioncorresponding to the fractional position fracX with de-scaling shift by18-d. In case of vertical gradient ∂I/∂y first gradient filter isapplied vertically using BIOfilterG corresponding to the fractionalposition fracY with de-scaling shift d-8, then signal displacement isperformed using BIOfilterS in horizontal direction corresponding to thefractional position fracX with de-scaling shift by 18-d. The length ofinterpolation filter for gradients calculation BIOfilterG and signaldisplacement BIOfilterF is shorter (6-tap) in order to maintainreasonable complexity. Table 6 shows the filters used for gradientscalculation for different fractional positions of block motion vector inBIO. Table 7 shows the interpolation filters used for prediction signalgeneration in BIO.

TABLE 6 Example Filters for gradients calculation in BIO Fractional pelposition Interpolation filter for gradient(BIOfilterG) 0 { 8, −39, −3,46, −17, 5} 1/16 { 8, −32, −13, 50, −18, 5} ⅛ { 7, −27, −20, 54, −19, 5}3/16 { 6, −21, −29, 57, −18, 5} ¼ { 4, −17, −36, 60, −15, 4} 5/16 { 3,−9, −44, 61, −15, 4} ⅜ { 1, −4, −48, 61, −13, 3} 7/16 { 0, 1, −54, 60,−9, 2} ½ { −1, 4, −57, 57, −4, 1}

TABLE 7 Example Interpolation filters for prediction signal generationin BIO Fractional pel position Interpolation filter for predictionsignal(BIOfilterS) 0 { 0, 0, 64, 0, 0, 0} 1/16 { 1, −3, 64, 4, −2, 0} ⅛{ 1, −6, 62, 9, −3, 1} 3/16 { 2, −8, 60, 14, −5, 1} ¼ { 2, −9, 57, 19,−7, 2} 5/16 { 3, −10, 53, 24, −8, 2} ⅜ { 3, −11, 50, 29, −9, 2} 7/16 {3, −11, 44, 35, −10, 3} ½ { 3, −10, 35, 44, −11, 3}

In the JEM, BIO is applied to all bi-predicted blocks when the twopredictions are from different reference pictures. When LIC is enabledfor a CU, BIO is disabled.

In the JEM, OBMC is applied for a block after normal MC process. Toreduce the computational complexity, BIO is not applied during the OBMCprocess. This means that BIO is only applied in the MC process for ablock when using its own MV and is not applied in the MC process whenthe MV of a neighboring block is used during the OBMC process.

2.2.19. Decoder-Side Motion Vector Refinement

In bi-prediction operation, for the prediction of one block region, twoprediction blocks, formed using a motion vector (MV) of list0 and a MVof list1, respectively, are combined to form a single prediction signal.In the decoder-side motion vector refinement (DMVR) method, the twomotion vectors of the bi-prediction are further refined by a bilateraltemplate matching process. The bilateral template matching applied inthe decoder to perform a distortion-based search between a bilateraltemplate and the reconstruction samples in the reference pictures inorder to obtain a refined MV without transmission of additional motioninformation.

In DMVR, a bilateral template is generated as the weighted combination(i.e. average) of the two prediction blocks, from the initial MV0 oflist0 and MV1 of list1, respectively, as shown in FIG. 34. The templatematching operation consists of calculating cost measures between thegenerated template and the sample region (around the initial predictionblock) in the reference picture. For each of the two reference pictures,the MV that yields the minimum template cost is considered as theupdated MV of that list to replace the original one. In the JEM, nine MVcandidates are searched for each list. The nine MV candidates includethe original MV and 8 surrounding MVs with one luma sample offset to theoriginal MV in either the horizontal or vertical direction, or both.Finally, the two new MVs, i.e., MV0′ and MV1′, as shown in FIG. 33, areused for generating the final bi-prediction results. A sum of absolutedifferences (SAD) is used as the cost measure. Please note that whencalculating the cost of a prediction block generated by one surroundingMV, the rounded MV (to integer pel) is actually used to obtain theprediction block instead of the real MV.

DMVR is applied for the merge mode of bi-prediction with one MV from areference picture in the past and another from a reference picture inthe future, without the transmission of additional syntax elements. Inthe JEM, when LIC, affine motion, FRUC, or sub-CU merge candidate isenabled for a CU, DMVR is not applied.

3. Related Tools

3.1.1. Diffusion Filter

In JVET-L0157, diffusion filter is proposed, wherein the intra/interprediction signal of the CU may be further modified by diffusionfilters.

3.1.1.1. Uniform Diffusion Filter

The Uniform Diffusion Filter is realized by convolving the predictionsignal with a fixed mask that is either given as h^(I) or as h^(IV),defined below. Besides the prediction signal itself, one line ofreconstructed samples left and above of the block are used as an inputfor the filtered signal, where the use of these reconstructed samplescan be avoided on inter blocks.

Let pred be the prediction signal on a given block obtained by intra ormotion compensated prediction. In order to handle boundary points forthe filters, the prediction signal needs to be extended to a predictionsignal pred_(ext). This extended prediction can be formed in two ways:Either, as an intermediate step, one line of reconstructed samples leftand above the block are added to the prediction signal and then theresulting signal is mirrored in all directions. Or only the predictionsignal itself is mirrored in all directions. The latter extension isused for inter blocks. In this case, only the prediction signal itselfcomprises the input for the extended prediction signal pred_(ext).

If the filter h^(I) is to be used, it is proposed to replace theprediction signal pred by h^(I)*pred, using the aforementioned boundaryextension. Here, the filter mask h^(I) is given as:

$\begin{matrix}{h^{I} = {(0.25)^{4}\begin{pmatrix}0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0 \\0 & 0 & 0 & 4 & 0 & 4 & 0 & 0 & 0 \\0 & 0 & 6 & 0 & 16 & 0 & 6 & 0 & 0 \\0 & 4 & 0 & 24 & 0 & 24 & 0 & 4 & 0 \\1 & 0 & 16 & 0 & 36 & 0 & 16 & 0 & 1 \\0 & 4 & 0 & 24 & 0 & 24 & 0 & 4 & 0 \\0 & 0 & 6 & 0 & 16 & 0 & 6 & 0 & 0 \\0 & 0 & 0 & 4 & 0 & 4 & 0 & 0 & 0 \\0 & 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\end{pmatrix}}} & {{Eq}.\mspace{11mu}(49)}\end{matrix}$

If the filter h^(IV) is to be used, it is proposed to replace theprediction signal pred by h^(IV)*pred. Here, the filter h^(IV) is givenas:

h ^(IV) =h ^(I) *h ^(I) *h ^(I) *h ^(I)   Eq. (50)

3.1.1.2. Directional Diffusion Filter

Instead of using signal adaptive diffusion filters, directional filters,a horizontal filter h^(hor) and a vertical filter h^(ver), are usedwhich still have a fixed mask. More precisely, the uniform diffusionfiltering corresponding to the mask h^(I) of the previous section issimply restricted to be either applied only along the vertical or alongthe horizontal direction. The vertical filter is realized by applyingthe fixed filter mask

$h_{ve\tau} = {\left( {0.5} \right)^{4}\begin{pmatrix}1 \\0 \\4 \\0 \\6 \\0 \\4 \\0 \\1\end{pmatrix}}$

to the prediction signal and the horizontal filter is realized by usingthe transposed mask h_(hor)=h_(ver) ^(t).

3.1.2. Bilateral Filter

Bilateral filter is proposed in JVET-L0406, and it is always applied toluma blocks with non-zero transform coefficients and slice quantizationparameter larger than 17. Therefore, there is no need to signal theusage of the bilateral filter. Bilateral filter, if applied, isperformed on decoded samples right after the inverse transform. Inaddition, the filter parameters, i.e., weights are explicitly derivedfrom the coded information.

The filtering process is defined as:

P′ _(0, 0) =P _(0, 0)Σ_(k=1) ^(K) W _(k)(abs(P _(k, 0) −P _(0, 0)))×(P_(k, 0) −P _(0, 0))   Eq. (51)

where P_(0, 0) is the intensity of the current sample and P′_(0, 0) isthe modified intensity of the current sample, P_(k, 0) and W_(k) are theintensity and weighting parameter for the k-th neighboring sample,respectively. An example of one current sample and its four neighboringsamples (i.e., K=4) is depicted in FIG. 35.

More specifically, the weight W_(k)(x) associated with the k-thneighboring sample is defined as follows:

$\begin{matrix}{{{W_{k}(x)} = {{Distance}_{k} \times {{Range}_{k}(x)}}}{wherein}} & {{Eq}.\mspace{11mu}(52)} \\{{{Distance}_{k} = {{e^{({- \frac{10000}{2\sigma_{d}^{2}}})}/1} + {4*e^{({- \frac{10000}{2\sigma_{d}^{2}}})}}}},} & {{Eq}.\mspace{11mu}(53)} \\{{{Range}_{k}(x)} = e^{({- \frac{x^{2}}{8*{({{QP} - 17})}*{({{QP} - 17})}}})}} & {{Eq}.\mspace{11mu}(54)}\end{matrix}$

σ_(d) is dependent on the coded mode and coding block sizes. Thedescribed filtering process is applied to intra-coded blocks, andinter-coded blocks when TU is further split, to enable parallelprocessing.

To better capture statistical properties of video signal, and improveperformance of the filter, weights function resulted from Eq. (52) arebeing adjusted by the σ_(d) parameter, tabulated in Table 8 as beingdependent on coding mode and parameters of block partitioning (minimalsize).

TABLE 8 Example value of σ_(d) for different block sizes and codingmodes Min(block width, block height) Intra mode Inter mode 4 82 62 8 7252 Other 52 32

To further improve the coding performance, for inter-coded blocks whenTU is not split, the intensity difference between current sample and oneof its neighboring samples is replaced by a representative intensitydifference between two windows covering current sample and theneighboring sample. Therefore, the equation of filtering process isrevised to:

$\begin{matrix}{P_{0,0}^{\prime} = {P_{0,0} + {\sum_{k = 1}^{N}{{W_{k}\left( {\frac{1}{M}{\sum_{m = {{- M}/2}}^{M/2}{{abs}\left( {P_{k,m} - P_{0,m}} \right)}}} \right)} \times \left( {P_{k,0} - P_{0,0}} \right)}}}} & {{Eq}.\mspace{11mu}(55)}\end{matrix}$

wherein P_(k, m) and P_(0, m) represent the m-th sample value within thewindows centered at P_(k, 0) and P_(0, 0), respectively. In thisproposal, the window size is set to 3×3. An example of two windowscovering P_(2, 0) and P_(0, 0) are depicted in FIG. 36.

3.1.3. Intra Block Copy

Decoder Aspect:

In some cases, the current (partially) decoded picture is considered asa reference picture. This current picture is put in the last position ofreference picture list 0. Therefore, for a slice using the currentpicture as the only reference picture, its slice type is considered as aP slice. The bitstream syntax in this approach follows the same syntaxstructure for inter coding while the decoding process is unified withinter coding. The only outstanding difference is that the block vector(which is the motion vector pointing to the current picture) always usesinteger-pel resolution.

Changes from block level CPR_flag approach are:

1. In encoder search for this mode, both block width and height aresmaller than or equal to 16.

2. Enable chroma interpolation when luma block vector is an odd integernumber.

3. Enable adaptive motion vector resolution (AMVR) for CPR mode when theSPS flag is on. In this case, when AMVR is used, a block vector canswitch between 1-pel integer and 4-pel integer resolutions at blocklevel.

Encoder Aspect:

The encoder performs RD check for blocks with either width or height nolarger than 16. For non-merge mode, the block vector search is performedusing hash-based search first. If there is no valid candidate found fromhash search, block matching based local search will be performed.

In the hash-based search, hash key matching (32-bit CRC) between thecurrent block and a reference block is extended to all allowed blocksizes. The hash key calculation for every position in current picture isbased on 4×4 blocks. For the current block of a larger size, a hash keymatching to a reference block happens when all its 4×4 blocks match thehash keys in the corresponding reference locations. If multiplereference blocks are found to match the current block with the same hashkey, the block vector costs of each candidates are calculated and theone with minimum cost is selected.

In block matching search, the search range is set to be 64 pixels to theleft and on top of current block.

3.1.4. History Based Motion Vector Prediction

PCT Application No. PCT/CN2018/093987, titled “MOTION VECTOR PREDICTIONBASED ON LOOK-UP TABLES, ” filed on Jul. 2, 2018, the content of whichis incorporated herein by reference, describes one or more look uptables with at least one motion candidate stored to predict motioninformation of a block.

A history-based MVP (HMVP) method is proposed wherein a HMVP candidateis defined as the motion information of a previously coded block. Atable with multiple HMVP candidates is maintained during theencoding/decoding process. The table is emptied when a new slice isencountered. Whenever there is an inter-coded block, the associatedmotion information is added to the last entry of the table as a new HMVPcandidate. The overall coding flow is depicted in FIG. 37. In oneexample, the table size is set to be L (e.g., L=16 or 6, or 44), whichindicates up to L HMVP candidates may be added to the table.

(1) In one embodiment, if there are more than L HMVP candidates from thepreviously coded blocks, a First-In-First-Out (FIFO) rule is applied sothat the table always contains the latest previously coded L motioncandidates. FIG. 38 depicts an example wherein the FIFO rule is appliedto remove a HMVP candidate and add a new one to the table used in theproposed method.

(2) In another embodiment, whenever adding a new motion candidate (suchas the current block is inter-coded and non-affine mode), a redundancychecking process is applied firstly to identify whether there areidentical or similar motion candidates in LUTs.

3.2 JVET-M0101

3.2.1. Adding HEVC-Style Weighted Prediction (WP)

In order to implement the HEVC-style weighted prediction, the followingsyntax changes (shown in bold text) can be made to PPS and slice header:

pic_parameter_set_rbsp( ) { Descriptor  pps_pic_parameter_set_id ue(v) pps_seq_parameter_set_id ue(v)  init_qp_minus26 se(v) transform_skip_enabled_flag u(1)  cu_qp_delta_enabled_flag u(1)  if(cu_qp_delta_enabled_flag )   diff_cu_qp_delta_depth ue(v) pps_cb_qp_offset se(v)  pps_cr_qp_offset se(v) pps_slice_chroma_qp_offsets_present_flag u(1)  weighted_pred_flag u(1) weighted_bipred_flag u(1)  deblocking_filter_control_present_flag u(1) if( deblocking_filter_control_present_flag ) {  deblocking_filter_override_enabled_flag u(1)  pps_deblocking_filter_disabled_flag u(1)   if(!pps_deblocking_filter_disabled_flag ) {    pps_beta_offset_div2 se(v)   pps_tc_offset_div2 se(v)   }  }  rbsp_trailing_bits( ) }

slice_header( ) } Descriptor  slice_pic_parameter_set_id ue(v) slice_address u(v)  slice_type ue(v)  if(partition_constraints_override_enabled_flag ) {  partition_constraints_override_flag ue(v)   if(partition_constraints_override_flag ) }   slice_log2_diff_min_qt_min_cb_luma ue(v)   slice_max_mtt_hierarchy_depth_luma ue(v)    if(slice_max_mtt_hierarchy_depth_luma != 0 )    slice_log2_diff_max_bt_min_qt_luma ue(v)    slice_log2_diff_max_tt_min_qt_luma ue(v)    }    if( slice_type = =I && qtbtt_dual_tree_intra_flag ) {    slice_log2_diff_min_qt_min_cb_chroma ue(v)    slice_max_mtt_hierarchy_depth_chroma ue(v)     if(slice_max_mtt_hierarchy_depth_chroma != 0 )     slice_log2_diff_max_bt_min_qt_chroma ue(v)     slice_log2_diff_max_tt_min_qt_chroma ue(v)     }    }   }  }  if (slice_type != I ) {   if( sps_temporal_mvp_enabled_flag )   slice_temporal_mvp_enabled_flag u(1)   if( slice_type = = B )   mvd_11_zero_flag u(1)   if( slice_temporal_mvp_enabled_flag ) {   if( slice_type = = B )     collocated_from_l0_flag u(1)   }    if( (weighted_pred_flag && slice_type = = P ) | |     ( weighted_bipred_flag&& slice_type = = B ) )     pred_weight_table( )  six_minus_max_num_merge_cand ue(v)   if( sps_affine_enable_flag )   five_minus_max_num_subblock_merge_cand ue(v)  }  slice_qp_delta se(v) if( pps_slice_chroma_qp_offsets_present_flag ) {   slice_cb_qp_offsetse(v)   slice_cr_qp_offset se(v)  }  if( sps_sao_enabled_flag ) {  slice_sao_luma_flag u(1)   if( ChromaArrayType != 0 )   slice_sao_chroma_flag u(1)  }  if( sps_alf_enabled_flag ) {  slice_alf_enabled_flag u(1)   if( slice_alf_enabled_flag )   alf_data( )  }  dep_quant_enabled_flag u(1)  if(!dep_quant_enabled_flag )   sign_data_hiding_enabled_flag u(1)  if(deblocking_filter_override_enabled_flag )  deblocking_filter_override_flag u(1)  if(deblocking_filter_override_flag ) {  slice_deblocking_filter_disabled_flag u(1)   if(!slice_deblocking_filter_disabled_flag ) {   slice_beta_offset_div2se(v)   slice_tc_offset_div2 se(v)   }  }  byte_alignment( ) }pred_weight_table( ) { Descriptor  luma_log2_weight_denom ue(v)  if(ChromaArrayType != 0 )   delta_chroma_log2_weight_denom se(v)  for( i =0; i <= num_ref_idx_l0_active_minus1; i++ )   luma_weight_l0_flag[ i ]u(1)  if( ChromaArrayType != 0 )   for( i = 0; i <=num_ref_idx_l0_active_minus1; i++ )    chroma_weight_l0_flag[ i ] u(1) for( i = 0; i <= num_ref_idx_l0_active_minus1; i++ ) {   if(luma_weight_l0_flag[ i ] ) {    delta_luma_weight_l0[ i ] se(v)   luma_offset_l0[ i ] se(v)   }   if( chroma_weight_l0_flag[ i ] )   for( j = 0; j < 2; j++ ) {     delta_chroma_weight_l0[ i ][ j ] se(v)    delta_chroma_offset_l0[ i ][ j ] se(v)   }  }  if( slice_type = = B) {   for( i = 0; i <= num_ref_idx_l1_active_minus1; i++ )   luma_weight_l1_flag[ i ] u(1)   if( ChromaArrayType != 0 )    for( i= 0; i <= num_ref_idx_l1_active_minus1; i++ )     chroma_weight_l1_flag[i ] u(1)   for( i = 0; i <= num_ref_idx_l1_active_minus1; i++ ) {    if(luma_weight_l1_flag[ i ] ) {     delta_luma_weight_l1[ i ] se(v)    luma_offset_l1[ i ] se(v)    }    if( chroma_weight_l1_flag[ i ] )    for( j = 0; < 2; j++ ) {      delta_chroma_weight_l1[ i ][ j ] se(v)     delta_chroma_offset_l1[ i ][ j ] se(v)     }   }  } }

3.2.2. Invoking (Bi-Prediction Bi-Prediction with Weighted Averaging(BWA), a.k.a GBI) and WP in a Mutually Exclusive Manner

Though BWA and WP both apply weights to the motion compensatedprediction signals, the specific operations are different. In thebi-prediction case, WP applies a linear weight and a constant offset toeach of the prediction signals depending on the (weight, offset)parameters associated with the ref_idx that is used to generate theprediction signal. Whereas there are some range constraints on these(weight, offset) values, the allowed ranges are relatively large andthere is no normalization constraint on the parameter values. WPparameters are signaled at the picture level (in slice headers). WP hasbeen shown to provide very large coding gain for fading sequences, andis generally expected to be enabled for such content.

BWA uses a CU level index to indicate how to combine the two predictionsignals in the case of bi-prediction. The BWA applies weightedaveraging, i.e., the two weights add up to 1. BWA provides about 0.66%coding gain for the CTC RA configuration, but is much less effectivethan WP for the fading content (JVET-L0201).

Method #1:

The PPS syntax element weight_bipred_flag is checked to determine if thegbi_idx is signaled at the current CU. The syntax signaling is modifiedas follows in bold text:

Des- coding_unit( x0, y0, cbWidth, cbHeight, treeType ) { criptor ...    if( sps_gbi_enabled_flag && inter_pred_     idc[ x0 ][ y0 ] = =PRED_BI &&       !weighted_bipred_flag && cbWidth *       cbHeight >=256 )     gbi_idx[ x0 ][ y0 ] ae(v) ... }

The first alternative will disable BWA for all the reference pictures ofthe current slice, if the current slice refers to a PPS for whichweighted_bipred_flag is set to 1.

Method #2:

BWA is disabled only if both of the reference pictures used in thebi-prediction have turned on weighted prediction, i.e., the (weight,offset) parameters of these reference pictures have non-default values.This allows the bi-predicted CUs that use reference pictures withdefault WP parameters (i.e. WP is not invoked for these CUs) to still beable to use BWA. The syntax signaling is modified as follows in boldtext:

Des- coding_ unit( x0, y0, cbWidth, cbHeight, treeType ) { criptor ...    if( sps_gbi_enabled flag && inter_pred_     idc[ x0 ][ y0 ] = =PRED_BI &&      luma_weight_l0_flag [ ref_idx_l0[ x0 ]      [ y0 ] == 0&&      chroma_ weight_l0_flag [ ref_idx_l0[ x0 ]      [ y0 ] ] == 0 &&     luma_weight_l1_flag [ ref_idx_l1[ x0 ]      [ y0 ] ] == 0 &&    chroma_weight_l1_flag [ ref_idx_l1[ x0 ]     [ y0 ] ] == 0 &&     cbWidth * cbHeight >= 256 )      gbi_idx[ x0 ][ y0 ] ae(v) ... }

4. Problems

In LIC, two parameters including scaling parameter a and offset b needto be derived by using neighboring reconstructed pixels, which may causelatency issue.

Hybrid intra and inter prediction, diffusion filter, bilateral filter,OBMC and LIC need to further modify the inter prediction signal indifferent ways, and they all have latency issue.

5. Some Example Embodiments and Techniques

The detailed inventions below should be considered as examples toexplain general concepts. These inventions should not be interpreted ina narrow way. Furthermore, these inventions can be combined in anymanner.

EXAMPLE 1

In some embodiments, LIC can only be performed for blocks located at CTUboundaries (called boundary blocks), and neighboring reconstructedsamples out of the current CTU may be used for deriving LIC parameters.In this case, for those blocks that are not located CTU boundaries(called inner blocks), LIC is always disabled without being signaled.

In some embodiments, selection of neighboring reconstructed samplesoutside current CTU may depend on the position of the block relative tothe CTU covering the current block.

In some embodiments, for blocks at the left boundary of a CTU, only leftreconstructed neighboring samples of the CU may be used to derive theLIC parameters.

In some embodiments, for blocks at the top boundary of a CTU, only abovereconstructed neighboring samples of the block may be used to derive theLIC parameters.

In some embodiments, for blocks at the top-left corner of a CTU, leftand/or above reconstructed neighboring samples of the block may be usedto derive the LIC parameters.

In some embodiments, for blocks at the top-right corner of a CTU,top-right and/or above reconstructed neighboring samples of the blockare used to derive the LIC parameters.

In some embodiments, for blocks at the bottom-left corner of a CTU,bottom-left and/or left reconstructed neighboring samples of the blockare used to derive the LIC parameters.

EXAMPLE 2

In some embodiments, sets of LIC parameters can be derived for blockslocated at CTU boundary only, and inner blocks of the CTU may inheritfrom one or multiple sets of these LIC parameter sets.

In some embodiments, a LIC parameter lookup table is maintained for eachCTU, and each set of the derived LIC parameter is inserted into the LICparameter table. Method described in PCT Application No.,PCT/CN2018/093987, titled “MOTION VECTOR PREDICTION BASED ON LOOK-UPTABLES, ” filed on Jul. 2, 2018, the content of which is incorporatedherein by reference, can be used to maintain the LIC parameter lookuptable.

In some embodiments, such lookup table is maintained for each referencepicture, and when deriving the LIC parameters, LIC parameters arederived for all reference pictures.

In some embodiments, such lookup table is emptied at the beginning ofeach CTU or CTU row or slice or tile or tile group or picture.

In some embodiments, for inner block coded with AMVP mode or affineinter mode, if LIC flag is true, the used set of LIC parameters isexplicitly signaled. For example, an index is signaled to indicate whichentry of the lookup table is used for each reference picture. In someembodiments, for uni-predicted block, if there is no valid entry in thelookup table for the reference picture, the LIC flag shall be false. Insome embodiments, for bi-predicted block, if there is no valid entry inthe lookup table for any of the reference picture, the LIC flag shall befalse. In some embodiments, for bi-predicted block, if there is validentry in the lookup table for at least one of the reference pictures,the LIC flag can be true. One LIC parameter index is signaled for eachreference picture with valid LIC parameters.

In some embodiments, more than one lookup tables are maintained. In someembodiments, when encoding/decoding the current CTU, it only usesparameters from lookup tables generated by some previouslyencoded/decoded CTUs, and the lookup table generated by the current CTUis used for some following CTUs. In some embodiments, each lookup tablemay correspond to one reference picture/one reference picture list/acertain range of block sizes/a certain coded mode/a certain block shape,etc. al.

In some embodiments, if an inner block is coded with merge or affinemerge mode, for spatial or/and temporal merge candidate, both LIC flagand LIC parameters are inherited from the corresponding neighboringblock.

In some embodiments, the LIC flag is inherited and the LIC parameter maybe signaled explicitly. In some embodiments, the LIC flag is signaledexplicitly and the LIC parameter may be inherited. In some embodiments,both LIC flag and LIC parameter are signaled explicitly. In someembodiments, the differences between the LIP parameters of the block andthe inherited parameters are signaled.

In some embodiments, for boundary block coded with AMVP mode or affineinter mode, if LIC flag is true, the used LIC parameter is derivedimplicitly using same methods as in [00158].

In some embodiments, if a boundary block is coded with merge or affinemerge mode, for spatial or/and temporal merge candidate, both LIC flagand LIC parameter are inherited from the corresponding neighboringblock.

In some embodiments, the LIC flag is inherited and the LIC parametersmay be signaled explicitly. In some embodiments, the LIC flag issignaled explicitly and the LIC parameters may be inherited. In someembodiments, both LIC flag and LIC parameter are signaled explicitly.

In some embodiments, if a block is coded with merge mode, for combinedmerge candidate or average merge candidate, LIC is always disabled.

In some embodiments, if LIC flag of any of the two merge candidates thatare used for generating the combined merge candidate or average mergecandidate is true, the LIC flag is set to true. In some embodiments, foran inner block, if both merge candidates that are used for generatingthe combined merge candidate or average merge candidate use LIC, it mayinherit LIC parameters from any of them. In some embodiments, the LICflag is inherited and the LIC parameter may be signaled explicitly. Insome embodiments, the LIC flag is signaled explicitly and the LICparameter may be inherited. In some embodiments, both LIC flag and LICparameter are signaled explicitly.

In some embodiments, if a block is coded with merge mode from a HMVPmerge candidate, LIC is always disabled. In some embodiments, if a blockis coded with merge mode from a HMVP merge candidate, LIC is alwaysenabled. In some embodiments, if LIC flag of the HMVP merge candidate istrue, the LIC flag is set to be true. For example, LIC flag can besignaled explicitly. In some embodiments, if LIC flag of the HMVP mergecandidate is true, the LIC flag is set to be true, and the LIPparameters are inherited from the HMVP merge candidate. In someembodiments, LIC parameters are signaled explicitly. In someembodiments, LIC parameters are derived implicitly.

EXAMPLE 3

LIC may be used together with intra block copy (IBC, or current picturereferencing) mode.

In some embodiments, if a block is coded with intra block copy mode,indication of LIC usage (e.g., a LIC flag) may be further signaled. Insome embodiments, in merge mode, if an IBC coded block inherits motioninformation from a neighboring block, it may also inherit the LIC flag.In some embodiments, it may also inherit the LIC parameters.

In some embodiments, if LIC flag is true, LIC parameter is derivedimplicitly using same method as in [00158]. In some embodiments, methoddescribed in Example 1 and/or Example 2 may be used. In someembodiments, if a block is coded with LIC enabled, indication of IBCusage may be further signaled.

EXAMPLE 4

In some embodiments, hybrid intra and inter prediction ((also known ascombined intra-inter prediction), diffusion filter, bilateral filter,transform domain filtering method, OBMC, LIC or any other tools thatmodify the inter prediction signal or modify the reconstructed blockfrom motion compensation (e.g., causing latency issues) are exclusivelyused.

In some embodiments, if LIC is enabled, all other tools are disabledimplicitly. If LIC flag is true (either explicitly signaled orimplicitly derived), on/off flag of other tools (if there is any) arenot signaled and implicitly derived to be off.

In some embodiments, if hybrid intra and inter prediction is enabled,all other tools are disabled implicitly. If hybrid intra and interprediction flag is true (either explicitly signaled or implicitlyderived), on/off flag of other tools (if there is any) are not signaledand implicitly derived to be off.

In some embodiments, if diffusion filter is enabled, all other tools aredisabled implicitly. If diffusion filter flag is true (either explicitlysignaled or implicitly derived), on/off flag of other tools (if there isany) are not signaled and implicitly derived to be off.

In some embodiments, if OBMC is enabled, all other tools are disabledimplicitly. If OBMC flag is true (either explicitly signaled orimplicitly derived), on/off flag of other tools (if there is any) arenot signaled and implicitly derived to be off.

In some embodiments, if bilateral filter is enabled, all other tools aredisabled implicitly. If bilateral filter flag is true (either explicitlysignaled or implicitly derived), on/off flag of other tools (if there isany) are not signaled and implicitly derived to be off.

In some embodiments, different tools may be checked in order.Furthermore, such checking process terminates when one of the abovetools is decided to be enabled. In some embodiments, the checking orderis LIC→diffusion filter→hybrid intra and inter prediction→OBMC→bilateralfilter. In some embodiments, the checking order is LIC→diffusionfilter→bilateral filter→hybrid intra and inter prediction→OBMC.

In some embodiments, the checking order is LIC→OBMC→diffusionfilter→bilateral filter→hybrid intra and inter prediction. In someembodiments, the checking order is LIC→OBMC→diffusion filter→hybridintra and inter prediction→bilateral filter. In some embodiments, theorder may be adaptively changed based on previously coded informationand/or based on coded information of current block (e.g., blocksize/reference picture/MV information/Low delay checkflag/tile/picture/slice types), such as based on the modes ofneighboring blocks.

In some embodiments, for any one of the above-mentioned tools (e.g.,CIIP, LIC, diffusion filter, bilateral filter, transform domainfiltering method), whether to automatically disable it and/or usedifferent ways for decoding the current block may depend on the codedmodes of the neighboring or non-adjacent row or columns.

In some embodiments, for any one of the above-mentioned tools (e.g.,CIIP, LIC, diffusion filter, bilateral filter, transform domainfiltering method), whether to automatically disable it may depend on allthe coded modes of the neighboring or non-adjacent row or columns.

In some embodiments, for any one of the above-mentioned tools (e.g.,CIIP, LIC, diffusion filter, bilateral filter, transform domainfiltering method), whether to enable it may depend on at least one ofthe samples in the neighboring or non-adjacent row or columns is NOTcoded with certain modes.

In some embodiments, the neighboring or non-adjacent row may include theabove row and/or above-right row. In some embodiments, the neighboringor non-adjacent column may include the left column and/or below-leftcolumn. In some embodiments, the coded modes/certain modes may includeintra mode and/or combined intra-inter mode (CIIP). In some embodiments,if any one neighboring/non-adjacent block in the neighboring ornon-adjacent row or columns is coded with intra and/or CIIP, such methodis disabled. In some embodiments, if all of neighboring/non-adjacentblocks in the neighboring or non-adjacent row or columns is coded withintra and/or CIIP, such method is disabled. In some embodiments,different methods may include short-tap filters/fewer neighboringsamples to be utilized for LIC parameter derivation, padding ofreference samples etc. al.

In some embodiments, for any one of the above-mentioned tools (e.g.,CIIP, LIC, diffusion filter, bilateral filter, transform domainfiltering method), it is disabled when there is at least one aboveneighboring/non-adjacent above neighboring block in the neighboring ornon-adjacent row is intra coded and/or combined intra-inter mode coded.

In some embodiments, for any one of the above mentioned tools (e.g.,CIIP, LIC, diffusion filter, bilateral filter, transform domainfiltering method), it is disabled when there is at least one leftneighboring/non-adjacent left neighboring block in the neighboring ornon-adjacent column is intra coded and/or combined intra-inter modecoded.

In some embodiments, for any one of the above mentioned tools (e.g.,CIIP, LIC, diffusion filter, bilateral filter, transform domainfiltering method), it is disabled when all blocks in the neighboring ornon-adjacent row/column is intra coded and/or combined intra-inter modecoded.

In some embodiments, for LIC coded blocks, the neighboring samples codedwith intra mode and/or hybrid intra and inter mode are excluded fromderivation of LIC parameters.

In some embodiments, for LIC coded blocks, the neighboring samples codedwith non-intra mode and/or non-CIIP mode may be included from derivationof LIC parameters.

EXAMPLE 5

In some embodiments, when certain tool is disabled for one block (suchas when all neighboring samples are intra coded), such a coding tool maystill be applied but in a different way.

In some embodiments, short-tap filters may be applied. In someembodiments, padding of reference samples may be applied. In someembodiments, neighboring row/column and/or non-adjacent row/column ofblocks in reference pictures (via motion compensation if needed) may beutilized as a replacement of current blocks' neighboring row/columnand/or non-adjacent row/column.

EXAMPLE 6

In some embodiments, LIC is used exclusively with GBI ormulti-hypothesis inter prediction.

In some embodiments, GBI information may be signaled after LICinformation. In some embodiments, whether to signal GBI information maydepend on the signaled/inferred LIC information. Furthermore, whether tosignal GBI information may depend on both LIC information and weightedprediction information associated with at least one reference picture ofcurrent block or of current tile/tile group/picture containing currentblock. In some embodiments, the information may be signaled inSPS/PPS/slice header/tile group header/tile/CTU/CU.

In some embodiments, LIC information may be signaled after GBIinformation. In some embodiments, whether to signal LIC information maydepend on the signaled/inferred GBI information. Furthermore, whether tosignal LIC information may depend on both GBI information and weightedprediction information associated with at least one reference picture ofcurrent block or of current tile/tile group/picture containing currentblock. In some embodiments, the information may be signaled inSPS/PPS/slice header/tile group header/tile/CTU/CU.

In some embodiments, if LIC flag is true, syntax elements required byGBI or multi-hypothesis inter prediction are not signaled.

In some embodiments, if GBI flag is true (e.g., unequal weights areapplied to two or multiple reference pictures), syntax elements requiredby LIC or multi-hypothesis inter prediction are not signaled.

In some embodiments, if GBI is enabled for a block with unequal weightsfor two or multipole reference pictures, syntax elements required by LICor multi-hypothesis inter prediction are not signaled.

In some embodiments, LIC is used exclusively with sub-blocktechnologies, such as affine mode. In some embodiments, LIC is usedexclusively with triangular prediction mode. In some embodiments, whentriangular prediction mode is enabled for one block, LIC is alwaysdisabled. In some embodiments, the LIC flag of one TPM merge candidatemay be inherited from a spatial or temporal block or other kinds ofmotion candidates (e.g., HMVP candidates). In some embodiments, the LICflag of one TPM merge candidate may be inherited from some spatial ortemporal blocks (e.g., only A1, B1). In some embodiments, LIC flag ofone TPM merge candidate may be always set to false.

In some embodiments, if multi-hypothesis inter prediction is enabled,syntax elements required by LIC or GBI are not signaled.

In some embodiments, different tools may be checked in a certain order.Furthermore, such checking process terminates when one of the abovetools is decided to be enabled. In some embodiments, the checking orderis LIC→GBI→multi-hypothesis inter prediction. In some embodiments, thechecking order is LIC→multi-hypothesis inter prediction→GBI. In someembodiments, the checking order is GBI→LIC→multi-hypothesis interprediction.

In some embodiments, the checking order is GBI→multi-hypothesis interprediction→LIC. In some embodiments, the order may be adaptively changedbased on previously coded information and/or based on coded informationof current block (e.g., block size/reference picture/MV information/Lowdelay check flag/tile/picture/slice types), such as based on the modesof neighboring blocks.

In some embodiments, the above methods may be applied only when currentblock is uni-prediction.

EXAMPLE 7

In some embodiments, LIC is used exclusively with combined inter-intraprediction (CIIP). In some embodiments, CIIP information may be signaledafter LIC information. In some embodiments, whether to signal CIIPinformation may depend on the signaled/inferred LIC information.Furthermore, whether to signal CIIP information may depend on both LICinformation and weighted prediction information associated with at leastone reference picture of current block or of current tile/tilegroup/picture containing current block. In some embodiments, theinformation may be signaled in SPS/PPS/slice header/tile groupheader/tile/CTU/CU.

In some embodiments, LIC information may be signaled after CIIPinformation.

In some embodiments, whether to signal LIC information may depend on thesignaled/inferred CIIP information. Furthermore, whether to signal LICinformation may depend on both CIIP information and weighted predictioninformation associated with at least one reference picture of currentblock or of current tile/tile group/picture containing current block. Insome embodiments, the information may be signaled in SPS/PPS/sliceheader/tile group header/tile/CTU/CU.

In some embodiments, if LIC flag is true, syntax elements required byCIIP are not signaled. In some embodiments, if CIIP flag is true, syntaxelements required by LIC are not signaled. In some embodiments, if CIIPis enabled, syntax elements required by LIC are not signaled.

EXAMPLE 8

In some embodiments, weighted prediction cannot be applied when one orsome of the coding tools below is/are applied (exclusive with weightedprediction):

a. BIO (a.k.a. BDOF)

b. CIIP

c. Affine prediction

d. Overlapped block motion compensation (OBMC)

e. Decoder side motion vector refinement (DMVR)

In some embodiments, if a coding tool and the weighted prediction aremutually exclusive, the information (e.g., a flag) indicating whetherthe coding tool is used is not signaled when weighted prediction isapplied. Such information (e.g., the flag) can be inferred to be zero.In some embodiments, the information may still be signaled expressivelyin SPS/PPS/slice header/tile group header/tile/CTU/CU.

EXAMPLE 9

In some embodiments, LIC may be used exclusively with weightedprediction at block level.

In some embodiments, when current block is bi-prediction, the signallingof LIC information may depend on the weighted_bipred_flag.

In some embodiments, when current block is uni-prediction, thesignalling of LIC information may depend on the weighted_pred_flag.

In some embodiments, signaling of LIC information may depend on theweighted prediction parameters associated with one or all referencepictures associated with current block.

In some embodiments, if weighted prediction is enabled for somereference picture or all reference pictures of a block, LIC may bedisabled for the block and LIC related syntax elements are not signaled.

In some embodiments, even if weighted prediction is enabled for somereference picture or all reference pictures of a block, LIC may be stillapplied and weighted prediction may be disabled for the block. In someembodiments, LIC may be applied on reference pictures where weightedprediction are not applied, and LIC may be disabled on referencepictures where weighted prediction are applied.

In some embodiments, LIC may be used with weighted prediction togetherfor one block.

EXAMPLE 10

In some embodiments, LIC may be used exclusively with weightedprediction at picture level/slice level/tile group level/CTU grouplevel.

In some embodiments, if weighted prediction is enabled for somereference picture or all reference pictures of a picture/slice/tilegroup/CTU group, LIC is disabled and all related syntax element are notsignaled.

In some embodiments, if LIC is enabled for a picture/slice/tilegroup/CTU group, weighted prediction is disabled for all its referencepictures and all related syntax elements are not signaled.

In some embodiments, LIC may be used with weighted prediction together.

EXAMPLE 11

In some embodiments, LIC may be used exclusively with CPR mode. In someembodiments, when CPR mode is enabled for a block, signalling ofindications of LIC usage and/or side information may be skipped. In someembodiments, when LIC mode is enabled for a block, signalling ofindications of CPR usage and/or side information may be skipped.

EXAMPLE 12

In some embodiments, in pairwise prediction or combined-bi prediction orother kinds of virtual/artificial candidates (e.g., zero motion vectorcandidates), LIC or/and GBI or/and weighted prediction may be disabled.

In some embodiments, if one of the two candidates involved in pairwiseprediction or combined-bi prediction adopt LIC prediction and none ofthe two candidates adopt weighted prediction or GBI, LIC may be enabledfor the pairwise or combined-bi merge candidate.

In some embodiments, if both candidates involved in pairwise predictionor combined-bi prediction adopt LIC prediction, LIC may be enabled forthe pairwise or combined-bi merge candidate.

In some embodiments, if one of the two candidates involved in pairwiseprediction or combined-bi prediction adopt weighted prediction and noneof the two candidates adopt LIC prediction or GBI, weighted predictionmay be enabled for the pairwise or combined-bi merge candidate.

In some embodiments, if both candidates involved in pairwise predictionor combined-bi prediction adopt weighted prediction, weighted predictionmay be enabled for the pairwise or combined-bi merge candidate.

In some embodiments, if one of the two candidates involved in pairwiseprediction or combined-bi prediction adopt GBI and none of the twocandidates adopt LIC prediction or weighted prediction, GBI may beenabled for the pairwise or combined-bi merge candidate.

In some embodiments, if both candidates involved in pairwise predictionor combined-bi prediction adopt GBI and GBI index are the same for thetwo candidates, GBI may be enabled for the pairwise or combined-bi mergecandidate.

EXAMPLE 13

In some embodiments, LIC prediction or/and weighted prediction or/andGBI may be considered in deblocking filter.

In some embodiments, even two blocks nearby the boundary have samemotion but with different LIC parameters/weighted predictionparameters/GBI indices, deblocking filtering process may be applied.

In some embodiments, if two blocks (nearby the boundary) have differentGBI index, a stronger boundary filtering strength may be assigned.

In some embodiments, if two blocks have different LIC flag, a strongerboundary filtering strength may be assigned.

In some embodiments, if two blocks adopt different LIC parameters, astronger boundary filtering strength may be assigned.

In some embodiments, if one block adopts weighted prediction and theother block does not adopt weighted prediction, or two blocks adoptdifferent weighting factor (e.g., predicted from reference pictures withdifferent weighting factor), a stronger boundary filtering strength maybe assigned.

In some embodiments, if two blocks nearby the boundary, one is codedwith LIC mode and the other not, deblocking filtering may be appliedeven the motion vectors are same.

In some embodiments, if two blocks nearby the boundary, one is codedwith weighted prediction mode and the other not, deblocking filteringmay be applied even the motion vectors are same.

In some embodiments, if two blocks nearby the boundary, one is codedwith GBI enabled (e.g., unequal weights) and the other not, deblockingfiltering may be applied even the motion vectors are same.

EXAMPLE 14

In some embodiments, affine mode/affine parameters/affine type may beconsidered in deblocking filter.

In some embodiments, whether to and/or how to apply deblocking filtermay depend on the affine mode/affine parameters.

In some embodiments, if two blocks (nearby the boundary) have differentaffine mode, a stronger boundary filtering strength may be assigned.

In some embodiments, if two blocks (nearby the boundary) have differentaffine parameters, a stronger boundary filtering strength may beassigned.

In some embodiments, if two blocks nearby the boundary, one is codedwith affine mode and the other not, deblocking filtering may be appliedeven the motion vectors are same.

EXAMPLE 15

Examples 1-14 may be also applicable to other kinds of filteringprocess.

EXAMPLE 16

In some embodiments, CIIP flag may be stored together with motioninformation in the history-based motion vector prediction (HMVP) table.

In some embodiments, when comparing two candidate motion information,CIIP flag is considered in the comparison.

In some embodiments, when comparing two candidate motion information,CIIP flag is not considered in the comparison.

In some embodiments, when a merge candidate is from an entry in the HMVPtable, the CIIP flag of that entry is also copied to the mergecandidate.

EXAMPLE 17

In some embodiments, LIC flag may be stored together with motioninformation in the history-based motion vector prediction (HMVP) table.

In some embodiments, when comparing two candidate motion information,LIC flag is considered in the comparison.

In some embodiments, when comparing two candidate motion information,LIC flag is not considered in the comparison.

In some embodiments, when a merge candidate is from an entry in the HMVPtable, the LIC flag of that table is also copied by the merge candidate.

EXAMPLE 18

In some embodiments, when LIC is conducted, the block should be dividedinto VPDUs (such as 64*64 or 32*32 or 16*16) process-blocks, each blockconducts LIC procedure sequentially (that means the LIC procedure of oneprocess-block may depend on the LIC procedure of another process-block), or parallelly (that means the LIC procedure of one process-blockcannot depend on the LIC procedure of another process-block).

EXAMPLE 19

In some embodiments, LIC may be used together with multi-hypothesisprediction (as described in [00314], [00324], [00326]).

In some embodiments, LIC flag is explicitly signaled formulti-hypothesis AMVP and merge mode (e.g., as described in [00324]). Insome embodiments, the explicitly signaled LIC flag is applied to bothAMVP mode and merge mode. In some embodiments, the explicitly signaledLIC flag is applied only to AMVP mode, while the LIC flag for the mergemode is inherited from the corresponding merge candidate. Different LICflag may be used for AMVP mode and merge mode. Meanwhile, different LICparameters may be derived/inherited for AMVP mode and merge mode. Insome embodiments, LIC is always disabled for the merge mode. In someembodiment, LIC flag is not signaled and LIC is always disabled for AMVPmode. However, for merge mode, LIC flag or/and LIC parameter may beinherited or derived.

In some embodiments, LIC flag is inherited from the corresponding mergecandidates for multi-hypothesis merge mode (e.g., as described in[00326]). In some embodiments, LIC flag is inherited for each of the twoselected merge candidates, therefore, different LIC flag may beinherited for the two selected merge candidates. Meanwhile, differentLIC parameter may be derived/inherited for the two selected mergecandidates. In some embodiments, LIC flag is only inherited for the1^(st) selected merge candidate and LIC is always disabled for the2^(nd) selected merge candidate.

In some embodiments, LIC flag is explicitly signaled formulti-hypothesis inter prediction mode (e.g., as described in [00314]).In some embodiments, if the block is predicted with merge mode (or UMVEmode) and additional motion information, the explicitly signaled LICflag may be applied to both merge mode (or UMVE mode) and the additionalmotion information. In some embodiments, if the block is predicted withmerge mode (or UMVE mode) and additional motion information, theexplicitly signaled LIC flag may be applied to the additional motioninformation. While for merge mode, LIC flag or/and LIC parameter may beinherited or derived. In some embodiments, LIC is always disabled forthe merge mode.

In some embodiments, if the block is predicted with merge mode (or UMVEmode) and additional motion information, LIC flag is not signaled anddisabled for the additional motion information. While for merge mode,LIC flag or/and LIC parameter may be inherited or derived. In someembodiments, if the block is predicted with AMVP mode and additionalmotion information, the explicitly signaled LIC flag may be applied toboth AMVP mode and the additional motion information. In someembodiments, LIC is always disabled for the additional motioninformation. In some embodiments, different LIC parameters may bederived/inherited for the merge mode (or UMVE mode)/AMVP mode and theadditional motion information.

In some embodiments, when multi-hypothesis is applied to a block,illumination compensation may be applied to certain prediction signals,instead of all prediction signals. In some embodiments, whenmulti-hypothesis is applied to a block, more than one flag may besignaled/derived to indicate the usage of illumination compensation forprediction signals.

EXAMPLE 20

In some embodiments, LIC flag may be inherited from the base mergecandidate in UMVE mode. In some embodiments, LIC parameters are derivedimplicitly as described in [00158]. In some embodiments, for boundaryblock coded in UMVE mode, LIC parameters are derived implicitly asdescribed in [00158]. In some embodiments, for inner block coded in UMVEmode, LIC parameters are inherited from base merge candidate. In someembodiments, LIC flag may be signaled explicitly in UMVE mode.

EXAMPLE 21

The above proposed methods or LIC may be applied under certainconditions, such as block sizes, slice/picture/tile types, or motioninformation.

In some embodiments, when a block size contains smaller than M*Hsamples, e.g., 16 or 32 or 64 luma samples, proposed method or LIC arenot allowed.

In some embodiments, when minimum size of a block's width or/and heightis smaller than or no larger than X, proposed method or LIC are notallowed. In one example, X is set to 8.

In some embodiments, when a block's width>th1 or >=th1 and/or a block'sheight>th2 or >=th2, proposed method or LIC are not allowed. In oneexample, th1 and/or th2 is set to 8.

In some embodiments, when a block's width<th1 or <=th1 and/or a block'sheight<th2 or <a=th2, proposed method or LIC are not allowed. In oneexample, th1 and/or th2 is set to 8.

In some embodiments, LIC is disabled for affine inter modes or/andaffine merge mode.

In some embodiments, LIC is disabled for sub-block coding tools likeATMVP or/and STMVP or/and planar motion vector prediction modes.

In some embodiments, LIC is only applied to some components. Forexample, LIC is applied to luma component. Alternatively, LIC is appliedto chroma component.

In some embodiments, BIO or/and DMVR is disabled if LIC flag is true.

In some embodiments, LIC is disabled for bi-predicted block.

In some embodiments, LIC is disabled for inner block coded with AMVPmode.

In some embodiments, LIC is only allowed for uni-predicted block.

EXAMPLE 22

In some embodiments, selection of neighboring samples used for derivingLIC parameters may depend on coded information, block shape, etc. al.

In some embodiments, if width>=height or width>height, only aboveneighboring pixels are used for deriving LIC parameters.

In some embodiments, if width<height, only left neighboring pixels areused for deriving LIC parameters.

EXAMPLE 23

In some embodiments, only one LIC flag may be signaled for a block withgeometry portioning structure (such as triangular prediction mode). Inthis case, all partitions of the block (all PUs) share the same value ofLIC enabling flag.

In some embodiments, for some PU, the LIC may be always disabledregardless the signaled LIC flag.

In some embodiments, if the block is split from the top-right corner tothe bottom-left corner, one set of LIC parameters is derived and usedfor both PUs. In some embodiments, LIC is always disabled for the bottomPU. In some embodiments, if the top PU is coded in merge mode, LIC flagis not signaled.

In some embodiments, if the block is split from the top-left corner tothe bottom-right corner, LIC parameters are derived for each PU. In someembodiments, above neighboring samples of the block are used forderiving LIC parameters of the top PU and left neighboring sample of theblock are used for deriving LIC parameters of the left PU. In someembodiments, one set of LIC parameters is derived and used for both PUs.

In some embodiments, if both PUs are code in merge mode, LIC flag is notsignaled and may be inherited from merge candidates. LIC parameters maybe derived or inherited.

In some embodiments, if one PU is coded in AMVP mode and another PU iscoded in merge mode, the signaled LIC flag may be applied to PU coded inAMVP mode only. For PU coded in merge mode, LIC flag or/and LICparameters are inherited. In some embodiments, LIC flag is not signaledand is disabled for the PU coded in AMVP mode. While, for PU coded inmerge mode, LIC flag or/and LIC parameters are inherited. In someembodiments, LIC is disabled for the PU coded in merge mode.

In some embodiments, if both PUs are coded in AMVP mode, one LIC flagmay be signaled for each PU.

In some embodiments, one PU may utilize reconstructed samples fromanother PU within current block which has been reconstructed to deriveLIC parameters.

EXAMPLE 24

In some embodiments, LIC may be performed for partial pixels instead ofthe whole block.

In some embodiments, LIC may be only performed for pixels around blockboundaries only, and for other pixels within the block, LIC is notperformed.

In some embodiments, LIC is performed for the top W×N rows or N×Hcolumns, wherein N is an integer number, W and H denote the width andthe height of the block. For example, N is equal to 4.

In some embodiments, LIC is performed for the top-left (W−m)×(H−n)region, wherein m and n are integer numbers, W and H denote the widthand the height of the block. For example, m and n are equal to 4.

EXAMPLE 25

In some embodiments, LIC flags may be utilized to update HMVP tables.

In some embodiments, an HMVP candidate may also include the LIC flag inaddition to the motion vectors and other stuff.

In some embodiments, LIC flags are not utilized to update HMVP tables.For example, a default LIC flag value is set for each HMVP candidate.

EXAMPLE 26

In some embodiments, if one block is coded with LIC, updating of HMVPtables may be skipped. In some embodiments, LIC coded blocks may also beutilized to update HMVP tables.

EXAMPLE 27

In some embodiments, motion candidates may be reordered according to LICflags.

In some embodiments, candidates with LIC enabled may be put before allor partial of candidates with LIC disabled in the merge/AMVP or othermotion candidate list.

In some embodiments, candidates with LIC disabled may be put before allor partial of candidates with LIC enabled in the merge/AMVP or othermotion candidate list.

In some embodiments, for LIC coded blocks and non-LIC coded blocks, themerge/AMVP or other motion candidate list construction process may bedifferent.

In some embodiments, for LIC coded blocks, the merge/AMVP or othermotion candidate list may not contain motion candidates derived fromnon-LIC-coded spatial/temporal neighboring or non-adjacent blocks orHMVP candidates with LIC flag equal to false.

In some embodiments, for non-LIC coded blocks, the merge/AMVP or othermotion candidate list may not contain motion candidates derived fromLIC-coded spatial/temporal neighboring or non-adjacent blocks or HMVPcandidates with LIC flag equal to true.

EXAMPLE 28

In some embodiments, whether to enable or disable the above methods maybe signaled in SPS/PPS/VPS/sequence header/picture header/sliceheader/tile group header/group of CTUs, etc. al. In some embodiments,which method to be used may be signaled in SPS/PPS/VPS/sequenceheader/picture header/slice header/tile group header/group of CTUs, etc.al. In some embodiments, whether to enable or disable the above methodsand/or which method to be applied may be dependent on block dimension,video processing data unit (VPDU), picture type, low delay check flag,coded information of current block (such as reference pictures, uni orbi-prediction) or previously coded blocks.

6. Additional Embodiments

Method #1:

The PPS syntax element weight_bipred_flag is checked to determine if theLIC_enabled_flag is signaled at the current CU. The syntax signalling ismodified shown as bold text below:

coding_unit( x0, y0, cbWidth, cbHeight, treeType ) { Descriptor ...    if( sps_LIC_enabled_flag &&     ( (inter_pred_idc[ x0 ][ y0 ] = =PRED_BI && !weighted_bipred_flag) || (inter_pred_idc[ x0 ][ y0 ] = =PRED_UNI && !weighted_pred_flag)) ) {     LIC_enabled_flag [ x0 ][ y0 ]ae(v)      ...     } ... }

The first alternative can disable LIC for all the reference pictures ofthe current slice/tile/tile group. For example,

1. if the current slice refers to a PPS for which weighted_bipred_flagis set to 1 and current block is bi-predicted;

2. if the current slice refers to a PPS for which weighted_pred_flag isset to 1 and current block is uni-predicted.

Method #2:

For the bi-prediction case:

LIC is disabled only if both of the reference pictures used in thebi-prediction have turned on weighted prediction, i.e., the (weight,offset) parameters of these reference pictures have non-default values.This allows the bi-predicted CUs that use reference pictures withdefault WP parameters (i.e. WP is not invoked for these CUs) to still beable to use LIC.

For the uni-prediction case:

LIC is disabled only if the reference picture used in the uni-predictionhave turned on weighted prediction, i.e., the (weight, offset)parameters of these reference pictures have non-default values. Thisallows the uni-predicted CUs that use reference pictures with default WPparameters (i.e. WP is not invoked for these CUs) to still be able touse LIC. The syntax signalling is modified shown as bold text below:

Des- coding_unit( x0, y0, cbWidth, cbHeight, treeType ) { criptor ...    if( sps_gbi_enabled_flag &&      ( (inter_pred_idc[ x0 ][ y0 ] = =PRED_BI &&      luma_weight_l0_flag [ ref_idx_l0[ x0 ]      [ y0 ] ] ==0 &&      chroma_weight_l0_flag [ ref_idx_l0[ x0 ]      [ y0 ] ] == 0 &&     luma_weight_l1_flag [ ref_idx_l1[ x0 ]      [ y0 ] ] == 0 &&   chroma_weight_l1_flag [ ref_idx_l1[ x0 ][ y0 ] ] == 0 ) ||(inter_pred_idc[ x0 ][ y0 ] = = PRED_UNI &&      luma_weight_lX_flag [ref_idx_lX[ x0 ][ y0 ] ] ==      0 &&      chroma_weight_lX_flag [ref_idx_lX[ x0 ]      [ y0 ] ] == 0     && ) )     )    LIC_enabled_flag [ x0 ][ y0 ] ae(v) ... }

In above table, X indicates the reference picture list (X being 0 or 1).

For above examples, the following may apply:

1. sps_LIC_enabled_flag which controls the usage of LIC per sequence maybe replaced by indications of usage of LIC perpicture/view/slice/tile/tile groups/CTU rows/regions/multiple CTUs/CTU.

2. The control of signalling of LIC_enabled_flag may depend on blockdimensions.

3. The control of signalling of LIC_enabled_flag may depend on gbiindex.

4. The control of signalling of gbi index may further depend onLIC_enabled_flag.

FIG. 39 is a block diagram illustrating an example of the architecturefor a computer system or other control device 2600 that can be utilizedto implement various portions of the presently disclosed technology. InFIG. 39, the computer system 2600 includes one or more processors 2605and memory 2610 connected via an interconnect 2625. The interconnect2625 may represent any one or more separate physical buses, point topoint connections, or both, connected by appropriate bridges, adapters,or controllers. The interconnect 2625, therefore, may include, forexample, a system bus, a Peripheral Component Interconnect (PCI) bus, aHyperTransport or industry standard architecture (ISA) bus, a smallcomputer system interface (SCSI) bus, a universal serial bus (USB), IIC(I2C) bus, or an Institute of Electrical and Electronics Engineers(IEEE) standard 674 bus, sometimes referred to as “Firewire.”

The processor(s) 2605 may include central processing units (CPUs) tocontrol the overall operation of, for example, the host computer. Incertain embodiments, the processor(s) 2605 accomplish this by executingsoftware or firmware stored in memory 2610. The processor(s) 2605 maybe, or may include, one or more programmable general-purpose orspecial-purpose microprocessors, digital signal processors (DSPs),programmable controllers, application specific integrated circuits(ASICs), programmable logic devices (PLDs), or the like, or acombination of such devices.

The memory 2610 can be or include the main memory of the computersystem. The memory 2610 represents any suitable form of random accessmemory (RAM), read-only memory (ROM), flash memory, or the like, or acombination of such devices. In use, the memory 2610 may contain, amongother things, a set of machine instructions which, when executed byprocessor 2605, causes the processor 2605 to perform operations toimplement embodiments of the presently disclosed technology.

Also connected to the processor(s) 2605 through the interconnect 2625 isa (optional) network adapter 2615. The network adapter 2615 provides thecomputer system 2600 with the ability to communicate with remotedevices, such as the storage clients, and/or other storage servers, andmay be, for example, an Ethernet adapter or Fiber Channel adapter.

FIG. 40 shows a block diagram of an example embodiment of a device 2700that can be utilized to implement various portions of the presentlydisclosed technology. The mobile device 2700 can be a laptop, asmartphone, a tablet, a camcorder, or other types of devices that arecapable of processing videos. The mobile device 2700 includes aprocessor or controller 2701 to process data, and memory 2702 incommunication with the processor 2701 to store and/or buffer data. Forexample, the processor 2701 can include a central processing unit (CPU)or a microcontroller unit (MCU). In some implementations, the processor2701 can include a field-programmable gate-array (FPGA). In someimplementations, the mobile device 2700 includes or is in communicationwith a graphics processing unit (GPU), video processing unit (VPU)and/or wireless communications unit for various visual and/orcommunications data processing functions of the smartphone device. Forexample, the memory 2702 can include and store processor-executablecode, which when executed by the processor 2701, configures the mobiledevice 2700 to perform various operations, e.g., such as receivinginformation, commands, and/or data, processing information and data, andtransmitting or providing processed information/data to another device,such as an actuator or external display. To support various functions ofthe mobile device 2700, the memory 2702 can store information and data,such as instructions, software, values, images, and other data processedor referenced by the processor 2701. For example, various types ofRandom Access Memory (RAM) devices, Read Only Memory (ROM) devices,Flash Memory devices, and other suitable storage media can be used toimplement storage functions of the memory 2702. In some implementations,the mobile device 2700 includes an input/output (I/O) unit 2703 tointerface the processor 2701 and/or memory 2702 to other modules, unitsor devices. For example, the I/O unit 2703 can interface the processor2701 and memory 2702 with to utilize various types of wirelessinterfaces compatible with typical data communication standards, e.g.,such as between the one or more computers in the cloud and the userdevice. In some implementations, the mobile device 2700 can interfacewith other devices using a wired connection via the I/O unit 2703. Themobile device 2700 can also interface with other external interfaces,such as data storage, and/or visual or audio display devices 2704, toretrieve and transfer data and information that can be processed by theprocessor, stored in the memory, or exhibited on an output unit of adisplay device 2704 or an external device. For example, the displaydevice 2704 can display a video frame modified based on the MVPs inaccordance with the disclosed technology.

FIG. 41 is a flowchart representation of a method 4100 of videoprocessing. The method 4100 includes determining (4102), in a conversionbetween a video block and a bitstream representation of the video block,that a video block is a boundary block of a coding tree unit (CTU) inwhich the video block is positioned and therefore local illuminationcompensation (LIC) coding tool is enabled for the video block, deriving(4104), based on the determining that LIC coding tool is enabled for thevideo block, parameters for local illumination compensation (LIC) of thevideo block, and performing (4106) the conversion by adjusting pixelvalues of the video block using LIC. For example, item 1 of Section 5discloses some example variations and embodiments of the method 4100.

The following clause-based listing described certain features andaspects of the disclosed techniques listed in Section 5.

1. A video processing method, comprising:

determining, in a conversion between a video block and a bitstreamrepresentation of the video block, that a video block is a boundaryblock of a coding tree unit (CTU) in which the video block is positionedand therefore local illumination compensation (LIC) coding tool isenabled for the video block;

deriving, based on the determining that LIC coding tool is enabled forthe video block, parameters for local illumination compensation (LIC) ofthe video block; and

performing the conversion by adjusting pixel values of the video blockusing LIC.

2. The method of clause 1, wherein the conversion generates the videoblock from the bitstream representation.

3. The method of clause 1, wherein the conversion generates thebitstream representation from the video block.

4. The method of any of clauses 1 to 3, wherein the deriving usessamples of neighboring blocks depending on a position of the currentblock within the CTU.

5. The method of clause 4, wherein (1) in case that the position of thecurrent block is at a left boundary of the CTU, the deriving uses onlyleft reconstructed neighboring samples, or (2) in case that the positionof the current block is a top boundary of the CTU, the deriving usesonly above reconstructed neighboring samples, or (3) in case that theposition of the current block is at a top-left corner of the CTU, thederiving uses left and/or above reconstructed neighboring samples, or(4) in case that the position of the current block is at a top-rightcorner of the CTU, the deriving uses right and/or above reconstructedneighboring samples, or (5) in case that the position of the currentblock is at a bottom-left corner of the CTU, the deriving uses leftand/or below reconstructed neighboring samples.

6. A video processing method, comprising:

determining, in a conversion between a video block and a bitstreamrepresentation of the video block, that a video block is an inner blockof a coding tree unit (CTU) in which the video block is positioned andtherefore local illumination compensation (LIC) coding tool is disabledfor the video block;

inheriting parameters for LIC of the video block; and

performing the conversion by adjusting pixel values of the video blockusing LIC.

7. The method of clause 6, wherein the inheriting includes:

maintaining a number of look-up tables of LIC parameters previously usedfor other blocks; and

deriving LIC parameters for the video block based on one or more LICparameters from the look-up table.

8. The method of clause 7, wherein the other blocks includes blocks fromthe CTU or blocks from a reference picture used for the current block.

9. The method of any of clauses 7 to 9, wherein the look-table isemptied and rebuilt for each CTU or a row of CTU or a slice or a tile ora tile group or a picture of the video block.

10.The method of clause 7, wherein the current block uses an advancedmotion vector prediction (AMVP) mode or an affine inter mode then thebitstream representation is configured to include a flag indicatingwhich LIC parameters are used for the current block.

11. The method of clause 10, wherein the flag is indicative of an indexto an entry in the LUT.

12. The method of any of clauses 7 to 11, wherein multiple LUTs areused.

13.The method of clause 12, wherein at least one LUT is maintained foreach reference picture or for each reference picture list used in theconversion of the current block.

14. The method of clause 7, wherein the current block uses a merge modeor affine merge mode for spatial or temporal merge candidate motionvectors, and wherein the inheriting includes inheriting one or both of aneigboring' block's LIC flag and LIC parameters.

15. The method of clause 7, wherein the current block uses a merge modeor affine merge mode for spatial or temporal merge candidate motionvectors, and wherein the inheriting includes configuring the bitstreamwith one or more difference values and computing LIC flag or LICparameters based on the one or more difference values and one or both ofa neigboring' block's LIC flag and LIC parameters.

16. The method of clause 1, wherein the current block is encoded usingan advanced motion vector prediction (AMVP) or an affine inter mode, andwherein the parameters are derived using a least square errorminimization in which subsamples set of neigbouring samples is used forerror minimization.

17.A video processing method, comprising:

determining, in a conversion between a video block and a bitstreamrepresentation of the video block, that both local illuminationcompensation and intra block copy coding tools are enabled for use bythe current block; and

performing the conversion by performing local illumination compensation(LIC) and intra block copy operations on the video block.

18. The method of clause 17, wherein an LIC flag in the bitstream isconfigured to indicate enablement of LIC for the current block.

19.The method of clause 18, wherein the conversion generates the videoblock from the bitstream representation.

20.The method of clause 18, wherein the conversion generates thebitstream representation from the video block.

21. The method of clause 17, wherein the current block uses merge modeand wherein the current block inherits LIC flag value of a neighboringblock.

22. The method of clause 17, wherein the current block uses merge modeand wherein the current block inherits LIC parameters of a neighboringblock.

23.A video processing method, comprising:

determining, during a conversion between a bitstream of a videocomprising multiple pictures having multiple blocks, a localillumination compensation (LIC) mode for a current block of the videobased on an LIC mode rule; and

performing the conversion between the current block and a correspondingbitstream representation of the current block.

24. The method of clause 23, wherein the LIC mode rule specifies to usethe LIC mode exclusive of inter prediction, a diffusion filter, abilateral filter, overlapped block motion compensation or, a tool thatmodifies an inter prediction signal for the current block.

25.The method of clause 24, wherein the LIC mode rule is explicitlysignaled in the bitstream.

26.The method of clause 23, wherein the LIC mode rule specifies to usethe LIC mode only when the current block does not use a generalizedbi-prediction (GBI) coding mode.

27. The method of any of clauses 23 or 26, wherein the LIC mode rule isexplicitly signaled in the bitstream and a GBI indication is omittedfrom the bitstream.

28.The method of clause 23, wherein the LIC mode rule specifies to usethe LIC mode only when the current block does not use a multi-hypothesiscoding mode.

29.The method of any of clauses 23 or 28, wherein the LIC mode rule isexplicitly signaled in the bitstream and the multi-hypothesis codingmode is implicitly disabled.

30.The method of any of clauses 28 to 29, wherein LIC mode rulespecifies to apply LIC to a selected subset of prediction signals of themulti-hypothesis mode.

31. The method of clause 23, wherein the LIC mode rule specifies toinherit an LIC flag from a base merge candidate for the current blockthat is also using an ultimate motion vector expression (UMVE) mode.

32.The method of clause 31, wherein the current block inherits its LICflag from a base merge candidate of the UMVE mode.

33.The method of clause 32, wherein the current block inherits using acalculation in Section 2.2.7.

34. The method of any of clauses 1 to 33 wherein LIC is used only whenthe current block also meets a condition related to size or a slice typeor a tile type or a picture type of the current block or a type ofmotion information associated with the current block.

35.The method of clause 34, wherein the condition excludes block sizessmaller than M*H samples, where M and H are pre-specified integervalues.

36. The method of clause 35, wherein M*H is equal to 16 or 32 or 64.

37. The method of clause 34, wherein the condition specifies that thecurrent block has a width or a height that is smaller than or no largerthan X, where X is an integer.

38.The method of clause 37, wherein X=8.

39.The method of clause 34, wherein the condition specifies that thecurrent block correspond to luma samples.

40. The method of clause 34, wherein the condition specifies that thecurrent block correspond to chroma samples.

41 . A video processing method, comprising:

determining, during a conversion between a video block of a video and abitstream representation of the video, local illumination compensation(LIC) parameters for the video block using at least some samples ofneighboring blocks of the video block; and

performing the conversion between the video block and the bitstreamrepresentation by performing LIC using the determined parameters.

42.The method of clause 41, wherein the conversion generates the videoblock from the bitstream representation.

43.The method of clause 41, wherein the conversion generates thebitstream representation from the video block.

44. The method of any of clauses 41 to 43, wherein identities the atleast some samples of neighboring block depend on code information ofthe current block or a shape of the current block.

45.The method of clause 44, wherein, a width of the current block isgreater than or equal to a height of the current block, and thereforeonly above neighboring pixels are used for deriving LIC parameters.

46.A video processing method, comprising:

performing a conversion between a video and a bitstream representationof the video, wherein the video is represented as video framescomprising video blocks, and local illumination compensation (LIC) isenabled only for video blocks that use a geometric prediction structureincluding a triangular prediction mode.

47. The method of clause 46, wherein the conversion generates the videoblock from the bitstream representation.

48.The method of clause 46, wherein the conversion generates thebitstream representation from the video block.

49.The method of any of clauses 46 to 48, wherein, for a current blockfor which LIC is enabled, all prediction unit partitions share a samevalue of LIC flag.

50.The method of any of clauses 46 to 48, wherein, for a current blockthat is partitioned from a top-right corner to a bottom-left corner, asingle set of LIC parameters is used for both partitions of the currentblock.

51.The method of any of clauses 46 to 48, wherein, for a current blockthat is partitioned from a top-left corner to a bottom-right corner, asingle set of LIC parameters is used for each partition of the currentblock.

52. A video processing method, comprising:

performing a conversion between a video and a bitstream representationof the video, wherein the video is represented as video framescomprising video blocks, and local illumination compensation (LIC) isimplemented for less than all pixels of a current block in theconversion to its corresponding bitstream representation.

53. The method of clause 52, wherein the conversion generates the videoblock from the bitstream representation.

54. The method of clause 52, wherein the conversion generates thebitstream representation from the video block.

55.The method of any of clauses 52 to 54, wherein LIC is performed onlyfor pixels on a boundary of the current block.

56.The method of any of clauses 52 to 54, wherein LIC is performed onlyfor pixels in a top portion of the current block.

57. The method of any of clauses 52 to 54, wherein LIC is performed onlyfor pixels in a right-side portion of the current block.

58.A method for video processing, comprising:

determining, in a conversion between a video block and a bitstreamrepresentation of the video block, that both local illuminationcompensation (LIC) and either generalized bi-prediction (GBi) ormulti-hypothesis inter prediction coding tools are enabled for use bythe current block; and

performing the conversion by performing LIC and either GBi ormulti-hypothesis inter prediction operations on the video block.

59.The method of clause 58, wherein information associated with the GBicoding tool is signaled after information associated with the LIC codingtool.

60.The method of clause 58, wherein information associated with the LICcoding tool is signaled after information associated with the GBi codingtool.

61.The method of clause 59 or 60, wherein the information is signaled ina sequence parameter set (SPS), a picture parameter set (PPS), a sliceheader, a tile group header, a tile, a coding unit (CU) or a coding treeunit (CTU).

62.The method of clause 58, wherein an LIC flag is true, and wherein thebitstream representation excludes one or more syntax elements associatedwith the GBi or multi-hypothesis inter prediction coding tools.

63.The method of clause 58, wherein a GBi flag is true, and wherein thebitstream representation excludes one or more syntax elements associatedwith the LIC or multi-hypothesis inter prediction coding tools.

64. The method of clause 58, wherein a multi-hypothesis inter predictionLIC flag is true, and wherein the bitstream representation excludes oneor more syntax elements associated with the LIC or GBi coding tools.

65.A method for video processing, comprising:

determining, in a conversion between a video block and a bitstreamrepresentation of the video block, that both local illuminationcompensation (LIC) and combined inter-intra prediction (CIIP) codingtools are enabled for use by the current block; and

performing the conversion by performing LIC and CIIP operations on thevideo block.

66.The method of clause 65, wherein information associated with the CIIPcoding tool is signaled after information associated with the LIC codingtool.

67. The method of clause 65, wherein information associated with the LICcoding tool is signaled after information associated with the CIIPcoding tool.

68.The method of clause 66 or 67, wherein the information is signaled ina sequence parameter set (SPS), a picture parameter set (PPS), a sliceheader, a tile group header, a tile, a coding unit (CU) or a coding treeunit (CTU).

69.The method of clause 65, wherein an LIC flag is true, and wherein thebitstream representation excludes one or more syntax elements associatedwith the CIIP coding tool.

70.The method of clause 65, wherein a CIIP flag is true, and wherein thebitstream representation excludes one or more syntax elements associatedwith the LIC coding tool.

71.The method of any of clauses 1 to 70 in which the bitstream isconfigured with a bit field controlling an operation of the conversion.

72.The method of clause 71, wherein the bit field is includes at asequence level, a picture level, a video level, a sequence header level,a picture header level, a slice header level, a tile level or a group ofcoding tree unit level.

73.A video encoding apparatus comprising a processor configured toimplement a method recited in any one or more of clauses 1 to 72.

74.A video decoding apparatus comprising a processor configured toimplement a method recited in any one or more of clauses 1 to 72.

75.A computer-readable medium having code stored thereon, the code, whenexecuted, causing a processor to implement a method recited in any oneor more of clauses 1 to 72.

FIG. 42 is a flowchart representation of a method 4200 of videoprocessing. The method 4200 includes constructing (4210), for aconversion between a current block of a video and a bitstreamrepresentation of the video, a motion candidate list with at least onemotion candidate. The method 4200 includes determining (4220), based ona candidate type of a first motion candidate, whether a generalizedbi-prediction (GBI) processing tool is enabled. The GBI processing toolcomprises deriving a final prediction based on applying equal or unequalweights to predictions derived from different reference lists accordingto a set of weights. The method 4200 also includes performing (4230) theconversion according to the determining.

In some embodiments, the motion candidate list comprises a mergecandidate list. In some embodiments, the first motion candidate is apairwise average merging candidate or zero motion vector mergingcandidate. In some embodiments, the GBI processing tool is disabled. Insome embodiments, equal weights are applied to each of the predictionsderived from different reference picture lists. In some embodiments, thepairwise average merging candidate is generated by averaging predefinedpairs of existing candidates in the merge candidate list.

FIG. 43 is a flowchart representation of a method 4300 of videoprocessing. The method 4300 includes determining (4310), for aconversion between a current block of a video and a bitstreamrepresentation of the video, an operational state of local illuminationcompensation (LIC) prediction, generalized bi (GBI) prediction, orweighted prediction. The current block is associated with a predictiontechnique that use at least one virtual motion candidate. The method4300 also includes performing (4320) the conversion according to thedetermining.

In some embodiments, the prediction technique comprises at least one ofpairwise prediction or combined-bi prediction. In some embodiments, theat least one virtual motion candidate comprises a zero motion vectorcandidate.

In some embodiments, the operational state indicates that at least oneof the LIC prediction, the GBI prediction, or the weighted prediction isdisabled. In some embodiments, two motion candidates are associated withthe prediction technique. In some embodiments, the operational state ofthe LIC prediction indicates that the LIC prediction is enabled in caseone of the two motion candidates adopts the LIC prediction and none ofthe two motion candidates adopts the GBI prediction or the weightedprediction. In some embodiments, the operational state of the LICprediction indicates that the LIC prediction is enabled in case both ofthe motion candidates adopt the LIC prediction. In some embodiments, theoperational state of the weighted prediction indicates that the weightedprediction is enabled in case one of the two motion candidates adoptsthe weighted prediction and none of the two motion candidates adopts theLIC prediction or the GBI prediction. In some embodiments, theoperational state of the weighted prediction indicates that the weightedprediction is enabled in case both of the motion candidates adopt theweighted prediction. In some embodiments, the operational state of theGBI prediction indicates that the GBI prediction is enabled in case oneof the two motion candidates adopts the GBI prediction and none of thetwo motion candidates adopts the LIC prediction or the weightedprediction. In some embodiments, the operational state of the GBIprediction indicates that the GBI prediction is enabled in case both ofthe motion candidates adopt the GBI prediction and use a same GBI index.Item 12 in the previous section further describes additional variationsand implementations of the method 4300.

FIG. 44 is a flowchart representation of a method 4400 of videoprocessing. The method 4400 includes determining (4410), for aconversion between a current block of a video and a bitstreamrepresentation of the video, a state of a filtering operation or one ormore parameters of the filtering operation for the current block basedon a characteristic of a local illumination compensation (LIC)prediction, a generalized bi (GBI) prediction, a weighted prediction, oran affine motion prediction of the current block. The method 4400includes performing (4420) the conversion based on the determining.

In some embodiments, the characteristic of the LIC prediction, the GBIprediction, or the weighted prediction comprises at least a flag of theLIC prediction, a parameter of the weighted prediction, or an index ofthe GBI prediction. In some embodiments, the filtering operationcomprises a deblocking filter. In some embodiments, the one or moreparameters of the filtering operation comprises a boundary filteringstrength of the deblocking filter. In some embodiments, the boundaryfiltering strength is increased in case a GBI index of the current blockis different than that of a neighboring block. In some embodiments, theboundary filtering strength is increased in case a LIC flag of thecurrent block is different than that of a neighboring block. In someembodiments, the boundary filtering strength is increased in caseparameters of the LIC prediction of the current block are different thanthose of a neighboring block. In some embodiments, the boundaryfiltering strength is increased in case the current block adopts adifferent weighting factor for the weighted prediction than aneighboring block. In some embodiments, the boundary filtering strengthis increased in case only one of the current block and a neighboringblock adopts the weighted prediction. In some embodiments, the boundaryfiltering strength is increased in case parameters of the affineprediction of the current block are different than those of aneighboring block. In some embodiments, the boundary filtering strengthis increased in case only one of the current block or a neighboringblock adopts the affine motion prediction.

In some embodiments, the current block and a neighboring block have samemotion vectors. In some embodiments, the state of the filteringoperation indicates that the deblocking filter is applied in case thecharacteristic of the LIC prediction, the GBI prediction, or theweighted prediction of the current block is different than that of aneighboring block. In some embodiments, the state of the filteringoperation indicates that the deblocking filter is applied in case onlyone of the current block and the neighboring block adopts the LICprediction. In some embodiments, the state of the filtering operationindicates that the deblocking filter is applied in case only one of thecurrent block and the neighboring block adopts the weighted prediction.In some embodiments, the state of the filtering operation indicates thatthe deblocking filter is applied in case only one of the current blockand the neighboring block adopts the GBI prediction. In someembodiments, the state of the filtering operation indicates that thedeblocking filter is applied in case only one of the current block andthe neighboring block adopts the affine prediction.

In some embodiments, the conversion generates the current block from thebitstream representation. In some embodiments, the conversion generatesthe bitstream representation from the current block. Items 13-15 in theprevious section further describes additional variations andimplementations of the method 4400.

The disclosed and other embodiments, modules and the functionaloperations described in this document can be implemented in digitalelectronic circuitry, or in computer software, firmware, or hardware,including the structures disclosed in this document and their structuralequivalents, or in combinations of one or more of them. The disclosedand other embodiments can be implemented as one or more computer programproducts, i.e., one or more modules of computer program instructionsencoded on a computer readable medium for execution by, or to controlthe operation of, data processing apparatus. The computer readablemedium can be a machine-readable storage device, a machine-readablestorage substrate, a memory device, a composition of matter effecting amachine-readable propagated signal, or a combination of one or morethem. The term “data processing apparatus” encompasses all apparatus,devices, and machines for processing data, including by way of example aprogrammable processor, a computer, or multiple processors or computers.The apparatus can include, in addition to hardware, code that creates anexecution environment for the computer program in question, e.g., codethat constitutes processor firmware, a protocol stack, a databasemanagement system, an operating system, or a combination of one or moreof them. A propagated signal is an artificially generated signal, e.g.,a machine-generated electrical, optical, or electromagnetic signal, thatis generated to encode information for transmission to suitable receiverapparatus.

A computer program (also known as a program, software, softwareapplication, script, or code) can be written in any form of programminglanguage, including compiled or interpreted languages, and it can bedeployed in any form, including as a stand-alone program or as a module,component, subroutine, or other unit suitable for use in a computingenvironment. A computer program does not necessarily correspond to afile in a file system. A program can be stored in a portion of a filethat holds other programs or data (e.g., one or more scripts stored in amarkup language document), in a single file dedicated to the program inquestion, or in multiple coordinated files (e.g., files that store oneor more modules, sub programs, or portions of code). A computer programcan be deployed to be executed on one computer or on multiple computersthat are located at one site or distributed across multiple sites andinterconnected by a communication network.

The processes and logic flows described in this document can beperformed by one or more programmable processors executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Processors suitable for the execution of a computer program include, byway of example, both general and special purpose microprocessors, andany one or more processors of any kind of digital computer. Generally, aprocessor will receive instructions and data from a read only memory ora random-access memory or both. The essential elements of a computer area processor for performing instructions and one or more memory devicesfor storing instructions and data. Generally, a computer will alsoinclude, or be operatively coupled to receive data from or transfer datato, or both, one or more mass storage devices for storing data, e.g.,magnetic, magneto optical disks, or optical disks. However, a computerneed not have such devices. Computer readable media suitable for storingcomputer program instructions and data include all forms of non-volatilememory, media and memory devices, including by way of examplesemiconductor memory devices, e.g., EPROM, EEPROM, and flash memorydevices; magnetic disks, e.g., internal hard disks or removable disks;magneto optical disks; and CD ROM and DVD-ROM disks. The processor andthe memory can be supplemented by, or incorporated in, special purposelogic circuitry.

While this patent document contains many specifics, these should not beconstrued as limitations on the scope of any invention or of what may beclaimed, but rather as descriptions of features that may be specific toparticular embodiments of particular inventions. Certain features thatare described in this patent document in the context of separateembodiments can also be implemented in combination in a singleembodiment. Conversely, various features that are described in thecontext of a single embodiment can also be implemented in multipleembodiments separately or in any suitable subcombination. Moreover,although features may be described above as acting in certaincombinations and even initially claimed as such, one or more featuresfrom a claimed combination can in some cases be excised from thecombination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. Moreover, the separation of various system components in theembodiments described in this patent document should not be understoodas requiring such separation in all embodiments.

Only a few implementations and examples are described and otherimplementations, enhancements and variations can be made based on whatis described and illustrated in this patent document.

1. A video processing method, comprising: constructing, for a conversionbetween a current block of a video and a bitstream of the video, amotion candidate list with at least one motion candidate; selecting amotion candidate from the motion candidate list; and performing theconversion based on the selected motion candidate; wherein whether ageneralized bi-prediction processing tool is disabled for the selectedmotion candidate is based on a candidate type of the selected motioncandidate, wherein the generalized bi-prediction processing toolindicates that different weights in coding Unit (CU)-level are appliedto two prediction blocks generated from a reference picture list 0 and areference picture list 1 to derive a final prediction block of thecurrent block.
 2. The method of claim 1, wherein the motion candidatelist comprises a merge candidate list.
 3. The method of claim 1, whereinin response to the selected motion candidate being a first mergecandidate, the generalized bi-prediction processing tool is disabled forthe selected motion candidate, and wherein a motion vector correspondingto a first reference list of the first merge candidate is generatedbased on motion vectors corresponding to the first reference list of twoexisted motion candidates that have been added into the merge candidatelist, and wherein if the motion vectors corresponding to the firstreference list of the two existed motion candidates are available, themotion vector of the first merge candidate is generated by using anaveraging operation on the motion vectors corresponding to the firstreference list of the two existed motion candidates, and if only oneexisted motion candidate's motion vector corresponding to the firstreference list is available, the motion vector corresponding to thefirst reference list of the first merge candidate is generated by usingthe available motion vector corresponding to the first reference list ofthe existed motion candidate.
 4. The method of claim 3, wherein equalweights in CU-level are applied to the two prediction blocks generatedfrom the reference picture list 0 and the reference picture list 1 toderive the final prediction block of the current block.
 5. The method ofclaim 1, wherein in response to the selected motion candidate being asecond merge candidate, the generalized bi-prediction processing tool isdisabled for the selected motion candidate, wherein a motion vector ofthe second merge candidate is equal to zero.
 6. The method of claim 1,wherein the conversion generates the current block from the bitstream.7. The method of claim 1, wherein the conversion generates the bitstreambased on the current block.
 8. An apparatus for processing video datacomprising a processor and a non-transitory memory with instructionsthereon, wherein the instructions upon execution by the processor, causethe processor to: construct, for a conversion between a current block ofa video and a bitstream of the video, a motion candidate list with atleast one motion candidate; select a motion candidate from the motioncandidate list; and perform the conversion based on the selected motioncandidate; wherein whether a generalized bi-prediction processing toolis disabled for the selected motion candidate is based on a candidatetype of the selected motion candidate, wherein the generalizedbi-prediction processing tool indicates that different weights in codingUnit (CU)-level are applied to two prediction blocks generated from areference picture list 0 and a reference picture list 1 to derive afinal prediction block of the current block.
 9. The apparatus of claim8, wherein the motion candidate list comprises a merge candidate list.10. The apparatus of claim 8, wherein in response to the selected motioncandidate being a first merge candidate, the generalized bi-predictionprocessing tool is disabled for the selected motion candidate, andwherein a motion vector corresponding to a first reference list of thefirst merge candidate is generated based on motion vectors correspondingto the first reference list of two existed motion candidates that havebeen added into the merge candidate list, and wherein if the motionvectors corresponding to the first reference list of the two existedmotion candidates are available, the motion vector of the first mergecandidate is generated by using an averaging operation on the motionvectors corresponding to the first reference list of the two existedmotion candidates, and if only one existed motion candidate's motionvector corresponding to the first reference list is available, themotion vector corresponding to the first reference list of the firstmerge candidate is generated by using the available motion vectorcorresponding to the first reference list of the existed motioncandidate.
 11. The apparatus of claim 10, wherein equal weights inCU-level are applied to the two prediction blocks generated from thereference picture list 0 and the reference picture list 1 to derive thefinal prediction block of the current block.
 12. The apparatus of claim8, wherein in response to the selected motion candidate being a secondmerge candidate, the generalized bi-prediction processing tool isdisabled for the selected motion candidate, wherein a motion vector ofthe second merge candidate is equal to zero.
 13. The apparatus of claim8, wherein the conversion generates the current block from thebitstream.
 14. The apparatus of claim 8, wherein the conversiongenerates the bitstream based on the current block.
 15. A non-transitorycomputer-readable storage medium storing instructions that cause aprocessor to: constructing, for a conversion between a current block ofa video and a bitstream of the video, a motion candidate list with atleast one motion candidate; selecting a motion candidate from the motioncandidate list; and performing the conversion based on the selectedmotion candidate; wherein whether a generalized bi-prediction processingtool is disabled for the selected motion candidate is based on acandidate type of the selected motion candidate, wherein the generalizedbi-prediction processing tool indicates that different weights in codingUnit (CU)-level are applied to two prediction blocks generated from areference picture list 0 and a reference picture list 1 to derive afinal prediction block of the current block.
 16. The medium of claim 15,wherein the motion candidate list comprises a merge candidate list. 17.The medium of claim 15, wherein in response to the selected motioncandidate being a first merge candidate, the generalized bi-predictionprocessing tool is disabled for the selected motion candidate, andwherein a motion vector corresponding to a first reference list of thefirst merge candidate is generated based on motion vectors correspondingto the first reference list of two existed motion candidates that havebeen added into the merge candidate list, and wherein if the motionvectors corresponding to the first reference list of the two existedmotion candidates are available, the motion vector of the first mergecandidate is generated by using an averaging operation on the motionvectors corresponding to the first reference list of the two existedmotion candidates, and if only one existed motion candidate's motionvector corresponding to the first reference list is available, themotion vector corresponding to the first reference list of the firstmerge candidate is generated by using the available motion vectorcorresponding to the first reference list of the existed motioncandidate.
 18. The medium of claim 15, wherein in response to theselected motion candidate being a second merge candidate, thegeneralized bi-prediction processing tool is disabled for the selectedmotion candidate, wherein a motion vector of the second merge candidateis equal to zero.
 19. A non-transitory computer-readable recordingmedium storing a bitstream of a video which is generated by a methodperformed by a video processing apparatus, wherein the method comprises:construct, for a conversion between a current block of a video and abitstream of the video, a motion candidate list with at least one motioncandidate; select a motion candidate from the motion candidate list; andgenerating the bitstream based on the selected motion candidate; whereinwhether a generalized bi-prediction processing tool is disabled for theselected motion candidate is based on a candidate type of the selectedmotion candidate, wherein the generalized bi-prediction processing toolindicates that different weights in coding Unit (CU)-level are appliedto two prediction blocks generated from a reference picture list 0 and areference picture list 1 to derive a final prediction block of thecurrent block.
 20. The medium of claim 19, wherein in response to theselected motion candidate being a first merge candidate, the generalizedbi-prediction processing tool is disabled for the selected motioncandidate, and wherein a motion vector corresponding to a firstreference list of the first merge candidate is generated based on motionvectors corresponding to the first reference list of two existed motioncandidates that have been added into the merge candidate list, andwherein if the motion vectors corresponding to the first reference listof the two existed motion candidates are available, the motion vector ofthe first merge candidate is generated by using an averaging operationon the motion vectors corresponding to the first reference list of thetwo existed motion candidates, and if only one existed motioncandidate's motion vector corresponding to the first reference list isavailable, the motion vector corresponding to the first reference listof the first merge candidate is generated by using the available motionvector corresponding to the first reference list of the existed motioncandidate.